-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make geometries non-movable in the Exploration feature (#936)
**Related Ticket:** Addressing [#934](#934) ### Description of Changes Two changes made, both affecting only the new map component in the Exploration page: 1. Geometries added from presets are non-draggable & non-editable 2. User-drawn & uploaded geometries are also non-draggable, but their vertices can be moved ### Notes & Questions About Changes - Added a new package in the project to initiate StaticMode (mode with no interactions on polygons): https://github.com/mapbox/mapbox-gl-draw-static-mode - Override the `dragMove` and the `dragFeature` methods for the `simple_select` and `direct_select` - We might intend to do more complex interactions in the future that need moving / dragging, so aside from custom modes, an alternative could be some kind of filtering in the original mode itself based on feature props? Ie. if a feature has a prop `isPreset`, then it should be handled differently etc. - This will probably affect the Data Analysis page as well, once [827](#827) is merged ### Validation / Testing 1. In E&A, select a preset -> it should be `static` so that no vertices are visible nor it can be dragged 2. On the same page, draw a polygon -> the polygons vertices should be draggable, but the polygon itself should be non-movable 3. The same behavior as step 2 applies to uploaded files
- Loading branch information
Showing
4 changed files
with
27 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters