Skip to content

Commit

Permalink
Fix boxZoom bug (#1017) (h/t @kibala145)
Browse files Browse the repository at this point in the history
Co-authored-by: Stepan Kuzmin <hello@stepankuzmin.com>
  • Loading branch information
kibala145 and stepankuzmin committed Mar 22, 2023
1 parent d08dd01 commit 9c0010c
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 9c0010c

Please sign in to comment.