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

_pmTempLayer not being set during pm:cut event #531

Closed
AdamJamesNaylor opened this issue Jan 1, 2020 · 1 comment
Closed

_pmTempLayer not being set during pm:cut event #531

AdamJamesNaylor opened this issue Jan 1, 2020 · 1 comment
Labels

Comments

@AdamJamesNaylor
Copy link

I believe I've found a possible issue.
When handling the 'pm:cut' event I've noticed that an additional layer is present. I was expecting one of them to have the _pmTempLayer flag set. Is that the correct behaviour?
In this fiddle https://jsfiddle.net/j9bm6agx/ you can see that undefined gets output twice if you add one polygon and then cut it once.

Expected there to either only be one layer once inside the event handler or one of the two layers to be marked as temp so I can safely ignore it during persisting.

(If I add a timeout delay of 1 second the second layer isn't present in the list of layers.)
Thanks

@codeofsumit
Copy link
Contributor

Fixed the fiddle: https://jsfiddle.net/f8602zot/

Thanks for reporting the bug Adam. I'll get on it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants