ht.graph.EditInteractor(graphView)

new EditInteractor(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:

handle_mousedown(e) → {void}

Parameters:
Name Type Description
e MouseEvent
Returns:
void

handleWindowMouseMove(e) → {void}

Parameters:
Name Type Description
e MouseEvent
Returns:
void

handleWindowMouseUp(e) → {void}

Parameters:
Name Type Description
e MouseEvent
Returns:
void

initSubModule() → {void}

Returns:
void

mp(listener, scope, ahead) → {void}

增加自身属性变化事件监听器

Parameters:
Name Type Attributes Description
listener function

监听器函数

scope Object <optional>
ahead boolean <optional>
Returns:
void

redraw() → {void}

Returns:
void

removeListeners() → {void}

移除事件监听

Returns:
void
Inherited From:

setCursor(cursor) → {void}

设置鼠标样式

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

setStyle(name, value) → {void}

设置样式

Parameters:
Name Type Description
name string

样式名

value any

样式值

Returns:
void

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:

ump(listener, scope) → {void}

删除自身属性变化事件监听器

Parameters:
Name Type Attributes Description
listener function

监听器函数

scope Object <optional>
Returns:
void