API Docs for: trial
Show:

nx.graphic.Topology.AbstractNode Class

Abstract node class

Methods

animate

(
  • config
)

Inherited from nx.graphic.Component:

Set animation for element,pass a config to this function { to :{ attr1:value, attr2:value, ... }, duration:Number, complete:Function }

Parameters:

  • config JSON

append

(
  • [parent]
)

Inherited from nx.graphic.Component:

Append component's element to parent node or other dom element

Parameters:

attach

(
  • parent
  • index
)

Inherited from nx.ui.AbstractComponent:

Attach the component to parent.

Parameters:

clearBinding

(
  • prop
)

Inherited from nx.Observable:

Clear binding for specified property.

Parameters:

destroy

()

Inherited from nx.ui.AbstractComponent:

Destroy the component.

detach

()

Inherited from nx.ui.AbstractComponent:

Detach the component from parent.

dispose

()

Inherited from nx.Observable

Dispose the component.

eachConnectedNode

(
  • callback
  • context
)

Iterate all connected node

Parameters:

getBinding

(
  • prop
)

Inherited from nx.Observable:

Get existing binding object for specified property.

Parameters:

Returns:

:

getBound

() | ClientRect

Inherited from nx.graphic.Component:

Get component's bound, delegate element's getBoundingClientRect function

Returns:

| ClientRect:

getContainer

(
  • comp
)
nx.dom.Element

Inherited from nx.ui.AbstractComponent:

Get the container for component.

Parameters:

Returns:

nx.dom.Element:

hide

()

Inherited from nx.graphic.Component:

Hide component

(
  • names
  • handler
  • context
)

Inherited from nx.Observable:

Parameters:

move

(
  • x
  • y
)

Move node certain distance

Parameters:

moveTo

(
  • x
  • y
  • callback
  • isAnimated
  • duration
)

Move to a position

Parameters:

notify

(
  • names
  • oldValue
)

Inherited from nx.Observable:

Parameters:

onAttach

()

Inherited from nx.ui.AbstractComponent:

Template method for component attach.

onChildAttach

()

Inherited from nx.ui.AbstractComponent:

Template method for child component attach.

onChildDetach

()

Inherited from nx.ui.AbstractComponent:

Template method for child component detach.

onDetach

()

Inherited from nx.ui.AbstractComponent:

Template method for component detach.

register

(
  • name
  • value
  • force
)

Inherited from nx.ui.AbstractComponent:

Register a resource.

Parameters:

remove

()

Inherited from nx.graphic.Component:

Remove component's element from dom tree

resolve

(
  • name
)
Any

Inherited from nx.ui.AbstractComponent:

Resolve a resource.

Parameters:

Returns:

Any:

setBinding

(
  • prop
  • expr
  • source
)

Inherited from nx.Observable:

Set binding for specified property.

Parameters:

setStyle

(
  • key
  • value
  • [duration=0]
  • [callback]
  • [context]
)

Inherited from nx.graphic.Component:

Set component's css style

Parameters:

  • key String

    css key

  • value

    css value

  • [duration=0] Number optional

    set transition time

  • [callback] Object optional
  • [context] Object optional

setTransform

(
  • [translateX]
  • [translateY]
  • [scale]
  • [duration=0]
)

Inherited from nx.graphic.Component:

Set component's transform

Parameters:

  • [translateX] Number optional

    x axle translate

  • [translateY] Number optional

    y axle translate

  • [scale] Number optional

    element's scale

  • [duration=0] Number optional

    transition time, unite is second

show

()

Inherited from nx.graphic.Component:

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.

Parameters:

unregister

(
  • name
)

Inherited from nx.ui.AbstractComponent:

Unregister a resource.

Parameters:

unwatch

(
  • names
  • handler
  • context
)

Inherited from nx.Observable:

Parameters:

Properties

class

Unknown

Inherited from nx.graphic.Component:

Set/get css class

enable

Unknown

Get/set node's usablity

id

Unknown

Get node's id

lockXAxle

Boolean

Lock x axle, node only can move at y axle

lockYAxle

Unknown

Lock y axle, node only can move at x axle

model

Any

Inherited from nx.ui.AbstractComponent:

node

Unknown

Get node self reference

position

Unknown

Get node's absolute position

scale

Unknown

Inherited from nx.graphic.Component

Get topology stage scale

selected

Unknown

Node is been selected statues

topology

Unknown

Get topology instance

translate

Unknown

Inherited from nx.graphic.Component:

Set/get translate, it set/get as {x:number,y:number}

translateX

Unknown

Inherited from nx.graphic.Component:

Set/get x translate

translateY

Unknown

Inherited from nx.graphic.Component:

Set/get y translate

vector

Unknown

Get node's vector

visible

Unknown

Inherited from nx.graphic.Component:

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

Inherited from nx.graphic.Component:

Fired when animation completed

Event Payload:

  • sender Object

    Trigger instance

  • event Object

    original event object

dragend

Inherited from nx.graphic.Component:

Fire when drag end

Event Payload:

  • sender Object

    Trigger instance

  • event Object

    original event object

dragmove

Inherited from nx.graphic.Component:

Fire when drag move

Event Payload:

  • sender Object

    Trigger instance

  • event Object

    original event object , include delta[x,y] for the shift

dragstart

Inherited from nx.graphic.Component:

Fire when drag start

Event Payload:

  • sender Object

    Trigger instance

  • event Object

    original event object

selectNode

Fired when node been selected or cancel selected

Event Payload:

  • sender Object

    trigger instance

  • event Object

    original event object

updateNodeCoordinate

Fired when node update coordinate

Event Payload:

  • sender Object

    trigger instance

  • event Object

    original event object