API Docs for: trial
Show:

nx.graphic.Topology.Link Class

Link 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.

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:

getoffset

() Number

Get calculated offset number

Returns:

getPaddingLine

()

Get link's padding Line

Returns:

:

hide

()

Inherited from nx.graphic.Component:

Hide component

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:

setModel

()

Factory function , will be call when set model

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

(
  • names
  • handler
  • context
)

Inherited from nx.Observable:

Parameters:

unregister

(
  • name
)

Inherited from nx.ui.AbstractComponent:

Unregister a resource.

Parameters:

unwatch

(
  • names
  • handler
  • context
)

Inherited from nx.Observable:

Parameters:

update

()

Update link's path

Properties

centerPoint

Unknown

Get this center point's position

class

Unknown

Inherited from nx.graphic.Component:

Set/get css class

color

Color

Set/get link's color

dotted

Boolean

Set/get is link dotted

drawMethod

Function

Set the link's draw function, after set this property please call update function

enable

Boolean

Set/get link's usability

id

Unknown

Get link's id

label

String

Get/set link's label, it is shown at the center point

line

Unknown

Get link's line object

linkKey

Unknown

Get link's linkKey

linkType

String

Get link type 'curve' / 'parallel'

model

Any

Inherited from nx.ui.AbstractComponent:

offset

Float

Get/set link's offset percentage

offsetRadix

Number

Get/set link's offset step

parentLinkSet

Unknown

Get link's parent linkSet

reverse

Unknown

Get is link is reverse link

scale

Unknown

Inherited from nx.graphic.Component:

Set/get scale

sourceNode

Unknown

Get source node's instance

sourceNodeID

Unknown

Get source node's id

sourcePosition

Unknown

Get source node's position

sourceVector

Unknown

Get source node's vector

sourceX

Unknown

Get source node's x position

sourceY

Unknown

Get source node's y position

style

Object

Set link's style

targetNode

Unknown

Get target node's instance

targetNodeID

Unknown

Get target node's id

targetPosition

Unknown

Get target node's position

targetVector

Unknown

Get target node's vector

targetX

Unknown

Get target node's x position

targetY

Unknown

Get target node's x position

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

visible

Unknown

Inherited from nx.graphic.Component:

Set/get element's visibility

width

Number

Set/get link's width

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