-
Notifications
You must be signed in to change notification settings - Fork 609
Not possible to click on overlapping shapes #1540
Copy link
Copy link
Open
Labels
Description
When multiple polygons overlap, clicking on a smaller polygon could select the larger polygon instead. The sortFeatures function was intended to sort polygons by area (smallest first), but area.geometry() is being called with a GeoJSON Feature wrapper instead of the raw geometry object. The area result ends us being always undefined and the sorting logic to fail.
Fix proposal
#1539
Steps to reproduce:
- Draw a large polygon
- Draw o smaller polygon in the middle of the larger polygon
- Select the larger polygon
- Deselect the larger polygon
- Click on the smaller polygon
Expected result
- Smaller polygon is selected
Actual result
- Larger polygon is selected
Video
before-fix.mov
Reactions are currently unavailable