浏览代码

add plot event

tags/2.3.1
Caven Chen 4 年前
父节点
当前提交
e6cdf2dbea
共有 3 个文件被更改,包括 44 次插入1 次删除
  1. 12
    1
      modules/event/EventType.js
  2. 5
    0
      modules/event/index.js
  3. 27
    0
      modules/event/type/PlotEvent.js

+ 12
- 1
modules/event/EventType.js 查看文件

@@ -75,6 +75,16 @@ const PathEventType = {
RESET_TIME_LINE: 'restTimeLine'
}

const PlotEventType = {
DARW_START: 'drawStart',
DARW_MOVING: 'drawMoving',
DARW_END: 'drawEnd',
EDIT_START: 'drawStart',
EDIT_MOVING: 'drawMoving',
ANCHOR_MOVING: 'anchorMoving',
EDIT_END: 'editEnd'
}

export {
MouseEventType,
ViewerEventType,
@@ -83,5 +93,6 @@ export {
LayerEventType,
OverlayEventType,
TrackEventType,
PathEventType
PathEventType,
PlotEventType
}

+ 5
- 0
modules/event/index.js 查看文件

@@ -25,3 +25,8 @@ export { default as OverlayEvent } from './type/OverlayEvent'
*/
export { default as TrackEvent } from './type/TrackEvent'
export { default as PathEvent } from './type/PathEvent'

/**
* plot
*/
export { default as PlotEvent } from './type/PlotEvent'

+ 27
- 0
modules/event/type/PlotEvent.js 查看文件

@@ -0,0 +1,27 @@
/**
* @Author: Caven
* @Date: 2020-05-11 23:28:13
*/

import { Cesium } from '@dc-modules/namespace'
import { PlotEventType } from '../EventType'
import Event from '../Event'

class PlotEvent extends Event {
constructor() {
super()
}

/**
*
* @private
*/
_registerEvent() {
Object.keys(PlotEventType).forEach(key => {
let type = PlotEventType[key]
this._cache[type] = new Cesium.Event()
})
}
}

export default PlotEvent

正在加载...
取消
保存