From fe01376d6d7909fc0ead415fc152c7afb3f4698f Mon Sep 17 00:00:00 2001 From: danielsippel Date: Wed, 17 Apr 2024 15:12:37 +0200 Subject: [PATCH] Revert "Fix inconsistent `draw.update` fires (#1160) (h/t @gynekolog)" This reverts commit ad4435057968dd9111def87ca1ef1b4dd2f43504. --- src/modes/direct_select.js | 5 ----- src/modes/simple_select.js | 5 +---- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/modes/direct_select.js b/src/modes/direct_select.js index 83f41c958..7ba82e9d5 100644 --- a/src/modes/direct_select.js +++ b/src/modes/direct_select.js @@ -183,15 +183,10 @@ DirectSelect.onMouseMove = function(state, e) { // On mousemove that is not a drag, stop vertex movement. const isFeature = isActiveFeature(e); const onVertex = isVertex(e); - const isMidPoint = isMidpoint(e); const noCoords = state.selectedCoordPaths.length === 0; if (isFeature && noCoords) this.updateUIClasses({ mouse: Constants.cursors.MOVE }); else if (onVertex && !noCoords) this.updateUIClasses({ mouse: Constants.cursors.MOVE }); else this.updateUIClasses({ mouse: Constants.cursors.NONE }); - - const isDraggableItem = onVertex || isFeature || isMidPoint; - if (isDraggableItem && state.dragMoving) this.fireUpdate(); - this.stopDragging(state); // Skip render diff --git a/src/modes/simple_select.js b/src/modes/simple_select.js index 4802d18b1..b8550db53 100644 --- a/src/modes/simple_select.js +++ b/src/modes/simple_select.js @@ -97,10 +97,7 @@ SimpleSelect.onStop = function() { doubleClickZoom.enable(this); }; -SimpleSelect.onMouseMove = function(state, e) { - const isFeature = CommonSelectors.isFeature(e); - if (isFeature && state.dragMoving) this.fireUpdate(); - +SimpleSelect.onMouseMove = function(state) { // On mousemove that is not a drag, stop extended interactions. // This is useful if you drag off the canvas, release the button, // then move the mouse back over the canvas --- we don't allow the