Skip to content

Not possible to click on overlapping shapes #1540

@giulianovarriale

Description

@giulianovarriale

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions