ht.graph.SelectInteractor(graphView)

new SelectInteractor(graphView)

实现单击选择和拖拽框选功能

Parameters:
Name Type Description
graphView ht.graph.GraphView

绑定拓扑组件

Extends

Members

_graphView :ht.graph.GraphView

拓扑组件

Inherited From:

gv :ht.graph.GraphView

拓扑组件

Inherited From:

Methods

addListeners() → {void}

添加事件监听
交互器遍历自身的 handle_xxx 函数,如果发现 xxx 匹配某种事件类型,会增加相应的事件监听
例如:
handle_keydown keydown 事件处理函数

Returns:
void
Inherited From:

autoScroll(event) → {void}

Parameters:
Name Type Attributes Description
event UIEvent <optional>
Returns:
void
Inherited From:

clear() → {void}

默认为空函数,在 tearDown 中执行

Returns:
void
Inherited From:

clearDragging() → {void}

清除拖拽

Returns:
void
Inherited From:

fi(event) → {void}

派发交互器事件

Parameters:
Name Type Description
event any
Returns:
void
Inherited From:

getClass() → {function}

获取类声明(构造函数)

Returns:
function
Inherited From:

getClassName() → {string}

获取类全名

Returns:
string
Inherited From:

getSuperClass() → {function}

获取父类声明(构造函数),继承类时可以用来调用父类构造或函数

Returns:
function -

父类声明(构造函数)

Inherited From:

getView() → {HTMLDivElement}

获取拓扑组件的根层div

Returns:
HTMLDivElement
Inherited From:

removeListeners() → {void}

移除事件监听

Returns:
void
Inherited From:

setCursor(cursor) → {void}

设置鼠标样式

Parameters:
Name Type Description
cursor string
Returns:
void
Inherited From:

setUp() → {void}

安装函数

Returns:
void
Inherited From:

startDragging(event) → {void}

启动拖拽

Parameters:
Name Type Description
event Event
Returns:
void
Inherited From:

tearDown() → {void}

卸载函数

Returns:
void
Inherited From: