Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: always unset editedFeature on editPanel close #2237

Merged
merged 2 commits into from
Oct 25, 2024
Merged

Conversation

yohanboniface
Copy link
Member

And only this panel.

This was creating a weird bug, steps to reproduce:

  • create a marker
  • shift-click on the marker to edit the layer (so without explicitly closing the panel)
  • try to type the layer name: the panel would close

This is also because currently the schema and render() are too dump, and when any name is changed then the data reflow is called, while it should not when editing the datalayer name.

We want to:

  • have more targeted schema
  • have more specific reflow in render

But that's for other PRs!

And only this panel.

This was creating a weird bug, steps to reproduce:

- create a marker
- shift-click on the marker to edit the layer (so without explicitly
  closing the panel)
- try to type the layer name: the panel would close

This is also because currently the schema and render() are too
dump, and when any `name` is changed then the `data` reflow is
called, while it should not when editing the datalayer name.

We want to:
- have more targeted schema
- have more specific reflow in render

But that's for other PRs!
When finishing drawing a polygon/line, Leaflet.Editable will send
both `editable:drawing:end` and `editable:drawing:commit`. In normal
flow, we only need to listen to the later, and we only need to
listen for the former in the case of pressing escape while drawing.
@yohanboniface yohanboniface merged commit a16f6d4 into master Oct 25, 2024
4 checks passed
@yohanboniface yohanboniface deleted the panel-onclose branch October 25, 2024 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants