Skip to content

Commit

Permalink
Revert "Revert "Fix boxZoom bug (mapbox#1017) (h/t @kibala145)""
Browse files Browse the repository at this point in the history
This reverts commit 28021a9.
  • Loading branch information
danielsippel committed Apr 18, 2024
1 parent d9e7857 commit 5652f21
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export default function(ctx) {
ctx.ui.removeButtons();
ctx.events.removeEventListeners();
ctx.ui.clearMapClasses();
if (ctx.boxZoomInitial) ctx.map.boxZoom.enable();
ctx.map = null;
ctx.container = null;
ctx.store = null;
Expand Down Expand Up @@ -63,6 +64,7 @@ export default function(ctx) {
controlContainer = ctx.ui.addButtons();

if (ctx.options.boxSelect) {
ctx.boxZoomInitial = map.boxZoom.isEnabled();
map.boxZoom.disable();
// Need to toggle dragPan on and off or else first
// dragPan disable attempt in simple_select doesn't work
Expand Down

0 comments on commit 5652f21

Please sign in to comment.