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

Do not share options between Draw.Feature instances #219

Merged
merged 1 commit into from
Nov 19, 2013

Conversation

yohanboniface
Copy link
Member

Extending this.options in place makes the object shared between every instances of L.Draw.Feature.

This change prevents this behaviour.

I don't think this was intentional, and in my understanding of Leaflet conventions, statics are made for being shared, not options.

My use case is to add a measure tool on uMap using Leaflet.draw, while I also use the plugin for classic drawing on the map.

Thanks!

Yohan

@mourner
Copy link
Member

mourner commented Nov 18, 2013

👍 from me

@jacobtoye
Copy link
Member

Nice catch @yohanboniface!

jacobtoye added a commit that referenced this pull request Nov 19, 2013
Do not share options between Draw.Feature instances
@jacobtoye jacobtoye merged commit 590f096 into Leaflet:master Nov 19, 2013
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.

3 participants