Creates a new cytoscape graph, assigns it to the #cy container and sets up basic event listeners.
parent element
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.
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
Multiplex takes a function that takes exactly one parameter in the form of a a single cytoscape Node, such as a star. It returns a function that executes the given function one or more times with different input based on the following criteria: If the nodes parameter is given, then multiplex uses it as input. For example multiplexing a star on a collection of nodes will execute that star for each node in the collection. If the nodes parameter is not given, but more than one node is selected, then multiplex uses the nodes selected in this graph as input. If the direct parameter is truthy then f will be called exactly once directly passing in the input as single parameter instead of looping over it. If the nodes parameter is not given and the set of selected nodes has size 0 or 1, then the given function is executed with the original input. Whatever happens, the singular input parameter of the returned function is always included as well. TODO: This function is hard to maintain, simplify if possible.
a function that accepts a single node
Optional
nodes: NodeCollectionThe nodes, each of which will be passed as parameter to a separate call of the given function. Can be null or undefined,
Optional
direct: booleanwhether the input is a cytoscape collection that can be passed directly into the function without looping, which can be much faster if possible.
the function described above.
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.
Set 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 target node
Optional
starPath: booleanwhether to show the star around all nodes on the path
a function that given a source node shows that path if possible and returns 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.
Optional
direction: Directiononly show edges that originate from node, not those that end in it. Optional and defaults to false.
Multiplex star operations.
arrange the given node and its close matches in the center and the connected nodes in a circle around them.
Optional
direction: Directionshow edges that originate from node, not those that end in it. Optional and defaults to false.
show star function applied to multiple nodes
Multiplex star operations into a new view.
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. Optional and defaults to false.
show star function applied to multiple nodes
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
Static
setShow (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.
Static
starthe elements to assign the star mode css class to
Cytoscape.js Graph Class with path operations and styling.