-
-
Notifications
You must be signed in to change notification settings - Fork 93
Description
Describe the bug
Changes in #504 mean that the state of dragPan and dragRotate at adapter instantiation time is respected when terra-draw manages map draggability. However, if you change map draggability outside of terra-draw after the adapter is instantiated, it does not respect that updated value.
Terra Draw npm version
Using terra-draw 1.16.1 and terra-draw-maplibre-gl-adapter 1.1.1
To Reproduce
We let users change between an "edit" and "navigate" mode by controlling the state of dragPan and dragRotate on the map. We start in "navigate" mode, so at terra-draw instantiation time the map is draggable. If you change to edit mode (the map is made non-draggable), then perform any drag interaction (regardless of if it is on a terra-draw object or not), terra-draw will revert the map to being draggable.
Expected behavior
Whenever terra-draw modifies the draggability of the map during it's interactions, it should revert the map to whatever state it was in before the interaction started, not the state of the map when terra-draw was initialised.
Desktop (please complete the following information):
- OS: macOS 15.6.1
- Browser: Chrome
- Version 140.0.7339.185
Additional context
We are maintaining our own fork and I have implemented a fix for this issue here. I don't know if it is the best approach, but if you have any guidance I would be happy to put together a PR.