Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/modes/direct_select.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,15 @@ 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
Expand Down
5 changes: 4 additions & 1 deletion src/modes/simple_select.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ SimpleSelect.onStop = function() {
doubleClickZoom.enable(this);
};

SimpleSelect.onMouseMove = function(state) {
SimpleSelect.onMouseMove = function(state, e) {
const isFeature = CommonSelectors.isFeature(e);
if (isFeature && state.dragMoving) this.fireUpdate();

// 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
Expand Down