Skip to content

Commit d4ef4c5

Browse files
authored
Merge pull request #51 from gratefulEachOne/main
fix: 🐛 Uncaught TypeError #50
2 parents 3b59498 + b41fba0 commit d4ef4c5

File tree

1 file changed

+2
-0
lines changed
  • src/utils/cesiumPluginsExtends/libs

1 file changed

+2
-0
lines changed

src/utils/cesiumPluginsExtends/libs/Draw.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -839,9 +839,11 @@ Draw.prototype = {
839839
},
840840
// 移除所以handler 监听
841841
removeEventHandler() {
842+
if(drawHandler){
842843
drawHandler.removeInputAction(Cesium.ScreenSpaceEventType.MOUSE_MOVE)
843844
drawHandler.removeInputAction(Cesium.ScreenSpaceEventType.RIGHT_CLICK)
844845
drawHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK) //移除事件
846+
}
845847
}
846848
}
847849
export { Draw }

0 commit comments

Comments
 (0)