Documentation ¶
Overview ¶
Package cytoscapejs implements marshaling and unmarshaling of Cytoscape.js JSON documents.
See http://js.cytoscape.org/ for Cytoscape.js documentation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Edge ¶
type Edge struct { Data EdgeData `json:"data"` Selected bool `json:"selected,omitempty"` Selectable bool `json:"selectable,omitempty"` Classes string `json:"classes,omitempty"` Scratch interface{} `json:"scratch,omitempty"` }
Edge is a Cytoscape.js edge.
type EdgeData ¶
EdgeData is a graph edge's data container.
func (*EdgeData) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
func (*EdgeData) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
type ElemData ¶
type ElemData struct { ID string Source string Target string Parent string Attributes map[string]interface{} }
ElemData is a graph element's data container.
func (*ElemData) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
func (*ElemData) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
type Element ¶
type Element struct { Group string `json:"group,omitempty"` Data ElemData `json:"data"` Position *Position `json:"position,omitempty"` RenderedPosition *Position `json:"renderedPosition,omitempty"` Selected bool `json:"selected,omitempty"` Selectable bool `json:"selectable,omitempty"` Locked bool `json:"locked,omitempty"` Grabbable bool `json:"grabbable,omitempty"` Classes string `json:"classes,omitempty"` Scratch interface{} `json:"scratch,omitempty"` }
Element is a mixed graph element.
type GraphElem ¶
type GraphElem struct { Elements []Element `json:"elements"` Layout interface{} `json:"layout,omitempty"` Style []interface{} `json:"style,omitempty"` }
GraphElem is a Cytoscape.js graph with mixed graph elements.
type GraphNodeEdge ¶
type GraphNodeEdge struct { Elements Elements `json:"elements"` Layout interface{} `json:"layout,omitempty"` Style []interface{} `json:"style,omitempty"` }
GraphNodeEdge is a Cytoscape.js graph with separated nodes and edges.
type Node ¶
type Node struct { Data NodeData `json:"data"` Position *Position `json:"position,omitempty"` RenderedPosition *Position `json:"renderedPosition,omitempty"` Selected bool `json:"selected,omitempty"` Selectable bool `json:"selectable,omitempty"` Locked bool `json:"locked,omitempty"` Grabbable bool `json:"grabbable,omitempty"` Classes string `json:"classes,omitempty"` Scratch interface{} `json:"scratch,omitempty"` }
Node is a Cytoscape.js node.
type NodeData ¶
NodeData is a graph node's data container.
func (*NodeData) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
func (*NodeData) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.