Creates a new cytoscape graph, assigns it to the #cy container and sets up basic event listeners.
parent element
Apply a function once per node an operation should act on, for functions that only support single nodes.
the function
Optionalele: NodeSingular
the node the operation was triggered on
Optionalnodes: NodeCollection
explicit collection, takes precedence over the selection
Inverts the screen colors in the canvas for day mode. Uses an inverted node js style file to keep node colors.
whether the canvas colors should be inverted.
Give every edge-type a certain color.
Show the property as edge label even on all edges, else only show edge labels on unselected edges.
Apply a function once to all nodes an operation should act on, for functions that support node collections.
the function
Optionalele: NodeSingular
the node the operation was triggered on
Optionalnodes: NodeCollection
explicit collection, takes precedence over the selection
Get the equivalent elements in this graph of the given elements from another graph.
elements from another graph
equivalent elements that exist in this graph
Get the equivalent nodes in this graph of the given nodes from another graph.
nodes from another graph
equivalent nodes that exist in this graph
Sets whether close matches are grouped in compound nodes.
Whether to activate or deactivate combine match mode. *
Returns, whether cumulative search is activated.
whether cumulative search is activated.
Get a collection of nodes/edges using a list of their IDs. If not existent in this graph, then all others are scanned. If found, the node or edge is added to the current view and returned.
iterable of cytoscape ids
cytoscape collection of elements with those ids
Get a collection of nodes/edges using a list of their IDs. Works only in this graph.
iterable of cytoscape ids
cytoscape collection of elements with those ids
Returns the start node for all path operations
the start node for all path operations, or null if none exists.
Move all matching nodes together.
the distance between them
position in a circle around the first node
the nodes to position
the radius of the circle
Create and return a new graph if the option is set to create star operations in a new view.
this iff the option to create stars in a new view is unset, a new view's graph if it is set
Center and highlight the given URI.
The URI of a class in the graph.
whether presenting the URI succeeded
Center and highlight the given URIs.
the URIs to present
whether to hide the other nodes
whether presenting the URIs succeeded
Removes all highlighting (except selection) and shows all hidden nodes.
OptionalshowHidden: booleanSet the given node as source for all path operations.
the new source
whether node is not null
Show close matches of the given nodes.
the nodes whose close matches are shown
Highlight the given two nodes, directly connected nodes (in both directions) of both of them and a shortest path between the two. Hide all other nodes except when in star mode.
path target node
whether a path could be found
Show all nodes and edges on a shortest path between "from" and "to". Hide all other nodes except when in star mode.
path source node
path target node
OptionalstarPath: boolean
whether to show the star around all nodes on the path
whether a path could be found
Highlight the give node and all its directly connected nodes (in both directions). Hide all other nodes except when in star mode.
node or collection of nodes. center of the star
arrange the given node and it's close matches in the center and the connected nodes in a circle around them.
Optionaldirection: Direction
only show edges that originate from node, not those that end in it. Optional and defaults to false.
Show a star around the given node and the selected nodes in another view.
the node the operation was triggered on
arrange the given node and its close matches in the center and the connected nodes in a circle around them.
only show edges that originate from node, not those that end in it.
whether to open a new view even if this graph is not the main view.
Show a "spider worm" between two nodes, which combines a star around "to" with a shortest path from "from" to "to". Hide all other nodes except when in star mode.
path source node
path target node, gets a "star" around it as well
whether a path could be found
StaticsetShow (unhide) the given elements or hide them using visibility: hidden. Do not use this for filters as they use other classes to interact properly with shown and hidden elements. Does not unhide filtered elements on its own.
the elements to hide
Whether to show or hide the nodes. Defaults to the sometimes implied value of true.
Staticstarthe elements to assign the star mode css class to
Cytoscape.js Graph Class with path operations and styling.