Describe the bug
After trying to update snapping behavior of polygon when selected it resets the previous flags/settings.
Terra Draw npm version
terradraw - 1.24.0,
Maplibre adapter - 1.3.0
To Reproduce
Steps to reproduce the behavior:
Have terradraw initated with snappable:true for select mode or any other flags
Have at least 2 polygons drawn (in this case)
Enter select mode and select 1 polygon
Try to snap it to other polygon
Update select mode options programmatically
this.draw?.updateModeOptions<typeof TerraDrawSelectMode>('select', {
flags: {
polygon: {
feature: {
coordinates: { snappable: false },
},
},
},
});
See it reset to default flags
Expected behavior
It would take partial updates just how the regular polygon/linestring mode updates work after instantiation without the need to track previous state.
Screenshots
If applicable, add screenshots to help explain your problem.
2026-03-30.16-34-09.mp4
Desktop (please complete the following information):
OS: Linux mint
Browser: Chrome
Version: 146.0.7680.164
Additional context
Describe the bug
After trying to update snapping behavior of polygon when selected it resets the previous flags/settings.
Terra Draw npm version
terradraw - 1.24.0,
Maplibre adapter - 1.3.0
To Reproduce
Steps to reproduce the behavior:
snappable:truefor select mode or any other flagsExpected behavior
It would take partial updates just how the regular polygon/linestring mode updates work after instantiation without the need to track previous state.
Screenshots
If applicable, add screenshots to help explain your problem.
2026-03-30.16-34-09.mp4
Desktop (please complete the following information):
Additional context