| @@ -42,6 +42,9 @@ class EditRectangle extends Edit { | |||
| this._isMoving = false | |||
| if (this._pickedAnchor && this._pickedAnchor.position) { | |||
| let position = this._clampToGround ? e.surfacePosition : e.position | |||
| if (!position) { | |||
| return false | |||
| } | |||
| this._pickedAnchor.position.setValue(position) | |||
| let properties = this._pickedAnchor.properties.getValue( | |||
| Cesium.JulianDate.now() | |||
| @@ -57,21 +60,6 @@ class EditRectangle extends Edit { | |||
| } | |||
| } | |||
| _onMouseMove(e) { | |||
| this._tooltip.showAt(e.windowPosition, '点击锚点移动,右击结束编辑') | |||
| if (!this._isMoving) { | |||
| return | |||
| } | |||
| if (this._pickedAnchor && this._pickedAnchor.position) { | |||
| let properties = this._pickedAnchor.properties.getValue( | |||
| Cesium.JulianDate.now() | |||
| ) | |||
| let position = this._clampToGround ? e.surfacePosition : e.position | |||
| this._pickedAnchor.position.setValue(position) | |||
| this._positions[properties.index] = position | |||
| } | |||
| } | |||
| _onRightClick(e) { | |||
| this.unbindEvent() | |||
| this._overlay.positions = Transform.transformCartesianArrayToWGS84Array( | |||