Skip to content

Commit

Permalink
mapbox#654 further limiting direct_select to only re-enable dragPan w…
Browse files Browse the repository at this point in the history
…hen direct_select has disabled it
  • Loading branch information
holyblader2010 committed Oct 4, 2017
1 parent 249db35 commit eb8cbee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modes/direct_select.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ DirectSelect.startDragging = function(state, e) {
};

DirectSelect.stopDragging = function(state) {
if (state.initialDragPanState) {
if (state.canDragMove && state.initialDragPanState === true) {
this.map.dragPan.enable();
}
state.dragMoving = false;
Expand Down Expand Up @@ -134,7 +134,7 @@ DirectSelect.onSetup = function(opts) {
dragMoving: false,
canDragMove: false,
selectedCoordPaths: opts.coordPath ? [opts.coordPath] : [],
initialDragPanState: this.map.dragPan.isEnabled()
desiredDragPanState: null
};

this.setSelectedCoordinates(this.pathsToCoordinates(featureId, state.selectedCoordPaths));
Expand Down

0 comments on commit eb8cbee

Please sign in to comment.