API Docs for: trial
Show:

nx.graphic.Topology.NodeMixin Class

Node mixin class

Methods

addNode

(
  • obj
  • inOption
)

Add a node to topology

Parameters:

Returns:

:

addNodeSet

(
  • obj
  • [inOption]
  • [parentNodeSet]
)

Add a nodeSet

Parameters:

Returns:

:

eachNode

(
  • callback
  • context
)

Traverse each node

Parameters:

getNode

(
  • id
)

Get node by node id

Parameters:

Returns:

:

removeNode

(
  • arg
)
Boolean

Remove a node

Parameters:

Returns:

zoomByNodes

(
  • [callback]
  • [context]
  • nodes
)

Zoom topology to let the passing nodes just visible at the screen

Parameters:

  • [callback] Function optional

    callback function

  • [context] Object optional

    callback context

  • nodes Array

    nodes collection

Properties

enableSmartLabel

Unknown

Enable smart label

nodeDraggable

Unknown

Set node's draggable

nodeInstanceClass

Unknown

Node instance class name, support function

nodeSetInstanceClass

Unknown

NodeSet instance class name, support function

showIcon

Unknown

Show or hide node's icon

NodeConfig

All node's config. key is node's property, support super binding value could be a single string eg: color:'#f00' value could be a an expression eg: label :'{model.id}' value could be a function eg iconType : function (model,instance){ return 'router'} value could be a normal binding expression eg : label :'{#label}'

NodeSetConfig

All nodeSet's config. key is node's property, support super binding value could be a single string eg: color:'#f00' value could be a an expression eg: label :'{model.id}' value could be a function eg iconType : function (model,instance){ return 'router'} value could be a normal binding expression eg : label :'{#label}'

selectedNodes

nx.data.ObservableCollection

All selected nodes, could direct add/remove nodes to this collection