new TakeCoordinates(controls参数)
Parameters:
| Name | Type | Description |
|---|---|---|
controls参数 |
Object |
Extends
Members
-
controls :Object
-
获取控制器
Type:
- Object
Methods
-
active(count, rightClickEnd)
-
激活坐标获取状态,通过点击开始选择坐标点
Parameters:
Name Type Default Description countNumber 500 点击多少次后,开始触发finish事件;默认500次点击; rightClickEndBoolean false 鼠标右键结束 -
activeMove(rightClickMovingEnd)
-
移动激活
Parameters:
Name Type Default Description rightClickMovingEndBoolean false 鼠标右键结束 -
beginMoving(index, rightClickMovingEnd)
-
设置移动锚点,并开始移动
Parameters:
Name Type Default Description indexNumber 移动锚点所在数组坐标 rightClickMovingEndBoolean false 鼠标右键结束 -
beginMovingByPointKey(pointKey, rightClickMovingEnd)
-
通过PointKey设置移动锚点,并开始移动
Parameters:
Name Type Default Description pointKeyString 移动锚点的pointKey rightClickMovingEndBoolean false 鼠标右键结束 -
clear()
-
清除所有锚点记录,包括捆绑事件,变为失活状态
-
clearPoint()
-
清除所有锚点记录
-
deactive()
-
失活坐标获取状态
-
dispatchEvent(event)
-
在此事件派发器上派发事件.
Parameters:
Name Type Description eventObject 待派发的事件. - Inherited From:
- Overrides:
-
dispose()
-
释放资源
-
remove(index)
-
删除指定锚点
Parameters:
Name Type Description indexNumber 锚点index -
removeByPointKey(pointKey)
-
通过pointKey删除指定锚点
Parameters:
Name Type Description pointKeyString 锚点pointKey -
stopMove()
-
取消移动激活
Events
-
ADD
-
添加完成后触发
Example
takeCoordinates.on(Glodon.CIMCube.Global.Defines.MapActionType.ADD, function (event) { console.log(event); }) -
FINISH
-
加载完成后触发
Example
takeCoordinates.on(Glodon.CIMCube.Global.Defines.MapActionType.FINISH, function (event) { console.log(event); }) -
LEFT_CLICK
-
鼠标左键单击触发
Example
takeCoordinates.on(Glodon.CIMCube.Global.Defines.ScreenSpaceEventType.LEFT_CLICK, function (event) { console.log(event); }) -
MOUSE_MOVE
-
鼠标移动触发
Example
takeCoordinates.on(Glodon.CIMCube.Global.Defines.ScreenSpaceEventType.MOUSE_MOVE, function (event) { console.log(event); }) -
MOVE
-
移动后触发
Example
takeCoordinates.on(Glodon.CIMCube.Global.Defines.MapActionType.MOVE, function (event) { console.log(event); }) -
RIGHT_CLICK
-
鼠标右键单击触发
Example
takeCoordinates.on(Glodon.CIMCube.Global.Defines.ScreenSpaceEventType.RIGHT_CLICK, function (event) { console.log(event); })