Class: CytoscapeInitialisationService

CytoscapeInitialisationService

Service which will take care of instanciating all the things in cytoscape.
Initialize the container, elements, style and layout of the graph.


new CytoscapeInitialisationService()

Constructor.

Source:

Members


container :HTMLElement

The DOM element which contains the graph.

Type:
  • HTMLElement
Source:

elements :Array.<Cy.ElementDefinition>

Elements of the graph.

Type:
  • Array.<Cy.ElementDefinition>
Source:

layout :Cy.LayoutOptions

Layout of the graph.

Type:
  • Cy.LayoutOptions
Source:

style :Array.<Cy.Stylesheet>

Style of the graph.

Type:
  • Array.<Cy.Stylesheet>
Source:

Methods


initContainer()

Init the container cytoscape which will contain the graph.

Source:
Returns:

The DOM element which is the container of the graph

Type
HTMLElement

initElements()

Initialize elements of the graph for cytoscape (empty here).
To add elements : GraphService#addNode, GraphService#addNodeOnClick

Source:
See:
Returns:

The elements of the graph, no elements by default

Type
Array.<Cy.ElementDefintion>

initLayout()

Initialize layout of the graph.
See Cytoscape JS website for possible values of layout : http://js.cytoscape.org/#layouts

Source:

initStyleSheet()

Initialize stylesheet of the graph.
Defines all css classes for elements in the graph.
Uses CssColors class for style color.

Source:
See:
  • CssColors
Returns:

The stylesheet containing all css classes

Type
Array.<Cy.Stylesheet>