nx.graphic.Topology.NodesLayer Class
Nodes layer Could use topo.getLayer('nodes') get this
Item Index
Methods
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
clear
()
clear layer's content
destroy
()
Destroy the component.
detach
()
Detach the component from parent.
dispose
()
Dispose the component.
fadeIn
-
force
-
[callback]
-
[context]
Fade in layer
fadeOut
-
[force]
-
[callback]
-
[context]
fade out layer
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 layer
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 layer
Properties
class
Unknown
Set/get css class
fade
Unknown
Get fade status.
forceFade
Unknown
Force layer fade.
model
Any
scale
Unknown
Set/get scale
topology
Unknown
Get topology
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
visible
Unknown
Set/get element's visibility
Events
animationCompleted
Fired when animation completed
dragend
Fire when drag end
dragmove
Fire when drag move