Skip to content

Commit 73f193d

Browse files
authored
Merge pull request #52 from gratefulEachOne/main
fix : 🐛 This object was destroyed
2 parents d4ef4c5 + 8ddcd63 commit 73f193d

File tree

1 file changed

+1
-1
lines changed
  • src/utils/cesiumPluginsExtends/libs

1 file changed

+1
-1
lines changed

src/utils/cesiumPluginsExtends/libs/Draw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ Draw.prototype = {
839839
},
840840
// 移除所以handler 监听
841841
removeEventHandler() {
842-
if(drawHandler){
842+
if(drawHandler&&!drawHandler.isDestroyed()){
843843
drawHandler.removeInputAction(Cesium.ScreenSpaceEventType.MOUSE_MOVE)
844844
drawHandler.removeInputAction(Cesium.ScreenSpaceEventType.RIGHT_CLICK)
845845
drawHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK) //移除事件

0 commit comments

Comments
 (0)