openlayers / openlayers/openlayers

Modify Interaction - ModifyEnd event return only one feature when we create a point on two touching polygons

Open
#12,149 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
12.6k
Forks
3.2k
Avg merge
2d 17h
Merged PRs (30d)
21

Description

Description
When we create a new point in a line touching two polygons and drag it, the modifyend event only returns one feature.
This seems wrong as the points effectively gets created in the two polygons, furthermore modifying that points a second time the modifyend event then return the two features.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://codesandbox.io/s/modify-features-forked-x1ivn?fontsize=14&hidenavigation=1&theme=dark
  2. Click on the line between two countries to modify the polygons by adding a point.
  3. See that their is only one feature in the logged array.
  4. Modify that same point, the two features are then correctly logged.

Expected behavior
When creating a point in a line touching two (or more?) polygons, the modifyend event should return all affected polygons.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run the linked CodeSandbox and reproduce the case with two touching polygons. Trace the Modify interaction and its modifyend event handling from the reproduction, then verify that creating a shared point reports every affected polygon while repeated modification still behaves correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.