nx.graphic.Topology.NodeSet Class
NodeSet class
Item Index
Methods
- animate
- append
- attach
- calcLabelPosition
- clearBinding
- destroy
- detach
- dispose
- eachConnectedNode
- eachLink
- eachNode
- getBinding
- getBound
- getContainer
- getNode
- hide
- iconType
- move
- moveTo
- notify
- onAttach
- onChildAttach
- onChildDetach
- onDetach
- register
- remove
- resolve
- setBinding
- setStyle
- setTransform
- show
- translateTo
- unregister
- unwatch
- updateByMaxObtuseAngle
Properties
Methods
animate
-
config
Set animation for element,pass a config to this function { to :{ attr1:value, attr2:value, ... }, duration:Number, complete:Function }
Parameters:
-
config
JSON
append
-
[parent]
Append component's element to parent node or other dom element
Parameters:
-
[parent]
nx.graphic.Component optional
calcLabelPosition
()
Set label to a node
destroy
()
Destroy the component.
detach
()
Detach the component from parent.
dispose
()
Dispose the component.
eachConnectedNode
-
callback
-
context
Iterate all connected node
eachLink
-
callback
-
context
Iterate all connected links to this node
getBinding
-
prop
Get existing binding object for specified property.
Parameters:
-
prop
Object
Returns:
getBound
()
| ClientRect
Get component's bound, delegate element's getBoundingClientRect function
Returns:
getContainer
-
comp
Get the container for component.
Parameters:
-
comp
Object
Returns:
hide
()
Hide component
iconType
()
Node icon's type
moveTo
-
x
-
y
-
callback
-
isAnimated
-
duration
Move to a position
onAttach
()
Template method for component attach.
onChildAttach
()
Template method for child component attach.
onChildDetach
()
Template method for child component detach.
onDetach
()
Template method for component detach.
register
-
name
-
value
-
force
Register a resource.
remove
()
Remove component's element from dom tree
setBinding
-
prop
-
expr
-
source
Set binding for specified property.
setStyle
-
key
-
value
-
[duration=0]
-
[callback]
-
[context]
Set component's css style
setTransform
-
[translateX]
-
[translateY]
-
[scale]
-
[duration=0]
Set component's transform
show
()
Show component
translateTo
-
x
-
y
-
callback
Use css translate to move node for high performance, when use this method, related link can't recive notification. Could hide links during transition.
Properties
class
Unknown
Set/get css class
collapsed
Unknown
Collapsed statues
color
Unknown
Set the node's color
enable
Unknown
Get/set node's usablity
id
Unknown
Get node's id
label
Unknown
Get node's label
lockYAxle
Unknown
Lock y axle, node only can move at x axle
model
Any
node
Unknown
Get node self reference
position
Unknown
Get node's absolute position
selected
Unknown
Get/set node's selected statues
showIcon
Unknown
Show/hide node's icon
topology
Unknown
Get topology instance
translate
Unknown
Set/get translate, it set/get as {x:number,y:number}
translateX
Unknown
Set/get x translate
translateY
Unknown
Set/get y translate
vector
Unknown
Get node's vector
visible
Unknown
Set/get element's visibility
x
Unknown
Get/set node's x position, suggest use position
y
Unknown
Get/set node's y position, suggest use position
Events
animationCompleted
Fired when animation completed
clickNode
Fired when click a node
dragend
Fire when drag end
dragmove
Fire when drag move
dragNode
Fired when drag a node
dragNodeEnd
Fired when finish a node
dragNodeStart
Fired when start drag a node
dragstart
Fire when drag start
enterNode
Fired when mouse enter a node
leaveNode
Fired when mouse leave a node
selectNode
Fired when node been selected or cancel selected