Class: Graph

Graph()

new Graph()

Source:

Extends

Members

anchorLine

Properties:
Name Type Description
anchorLine AnchorLine
Source:

animation

Properties:
Name Type Description
animation Animation
Source:

line

Properties:
Name Type Description
line Line
Source:

node

Properties:
Name Type Description
node Node
Source:

Methods

addLinkHoverEvent()

添加链接点事件

Source:

clear()

清空

Overrides:
Source:

clearGraph()

清空画布

Source:

fire(event, data)

Parameters:
Name Type Description
event *
data *
Overrides:
Source:

off(event, offFunc)

关闭绑定的事件

Parameters:
Name Type Description
event *
offFunc *

不传清空所有

Overrides:
Source:

offLinkHoverEvent()

关闭线hover事件

Source:

on(event, func, index)

箭头

Parameters:
Name Type Description
event *
func *
index *
Overrides:
Source:

(async) render(data)

Parameters:
Name Type Description
data *
Source:

Events

beforeRender 渲染之前触发

Source:

copy

Type:
  • Object
Source:

delete

Type:
  • Object
Source:

paste

Type:
  • Object
Source:

render 渲染后触发

Source:

line:add

Source:

line:beforeadd

Source:

line:change

Source:

line:click

Source:

line:drag

Source:

line:drop

Source:

line:drop

Source:

line:mouseenter

Source:

line:mouseleave

Source:

line:remove

Source:

node:change - 节点变化事件

Properties:
Name Type Description
node Object
Source:

node:click - 节点点击事件

Source:

node:mouseenter - 节点进入事件

Source:

node:mouseleave

Source:

node:move 节点移动事件

Source:

node:remove - 移除节点事件

Source:

node:unactive

Source: