This commit is contained in:
ethan 2023-08-24 16:01:36 +08:00
parent 15a9ae1e95
commit 500259c7fb

View File

@ -308,7 +308,7 @@ export default class Base {
// Listen for left mouse button release events
this.controlPointsEventHandler.setInputAction(() => {
// Trigger 'drawUpdate' when there is a change in coordinates before and after dragging.
if (!this.cesium.Cartesian3.equals(dragStartPosition, draggedIcon.position._value)) {
if (draggedIcon && !this.cesium.Cartesian3.equals(dragStartPosition, draggedIcon.position._value)) {
this.eventDispatcher.dispatchEvent('drawUpdate', draggedIcon.position._value);
}
isDragging = false;