| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-10-18 17:17:50 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2022-10-20 10:10:26 |
| | | * @LastEditTime: 2022-10-25 15:41:19 |
| | | * @FilePath: \srs-police-affairs\src\utils\EntityDraw.js |
| | | * @Description: |
| | | * |
| | |
| | | activeShape = null |
| | | |
| | | drawCompletePosition = [] |
| | | |
| | | type = '' |
| | | |
| | | constructor() { |
| | | // 去除双击 |
| | |
| | | global.viewer.addLayer(this.drawPointLayer) |
| | | } |
| | | |
| | | activate () { |
| | | activate (type) { |
| | | this.type = type |
| | | |
| | | this.drawCompletePosition = [] |
| | | |
| | | this.clearLayer() |
| | |
| | | clearLayer () { |
| | | this.drawPolygonLayer.clear() |
| | | } |
| | | |
| | | // 销毁 |
| | | destroy () { |
| | | this.unRegisterEvents() |
| | | this.drawPolygonLayer.clear() |
| | | this.drawPolygonLayer.remove() |
| | | this.drawPointLayer.clear() |
| | | this.drawPointLayer.remove() |
| | | |
| | | this.activeShape = null |
| | | this.activeShapePoints = [] |
| | | this.drawCompletePosition = [] |
| | | } |
| | | } |