SNIK Graph - v25.01
    Preparing search index...

    Function presetLayout

    • Applies a preset layout matching the node id's to the first element of each subarray in pos. Nodes without matching entry in pos are set to position {x:0,y:0}, positions without matching node id are ignored.

      Parameters

      • cy: Core

        the Cytoscape.js graph to apply the positions on, node id's need to match those in the given positions

      • pos: object[][]

        an array of arrays, each of which contains a node id and the positions for a node id (as a cytoscape Position object) in this order

      Returns Promise<boolean>

      whether the layout could be successfully applied

      `presetLayout(cy,[["http://www.snik.eu...",{"x":0,"y":0}],...]);`