makinacorpus / Leaflet.FileLayer

Loads files locally (GeoJSON, KML, GPX) as layers using HTML5 File API
http://makinacorpus.github.io/Leaflet.FileLayer/
MIT License
270 stars 91 forks source link

Preventing files from being loaded outside of map container #31

Closed MuellerMatthew closed 7 years ago

MuellerMatthew commented 8 years ago

This change prevents files which are dropped outside the dropbox from having any effect.

Do you think we should add an option so users can toggle whether they want the entire page to be a dropbox or just the map?

leplatrem commented 7 years ago

I don't really maintain this library anymore, but I guess that your suggestion with an option (unable by default like current behaviour) and a bit of documention in the README would easily be merged!

SBats commented 7 years ago

Hi and thank you for the PR ! I'm more concerned by the fact that we should not prevent a natural effect of the browser outside of our plugin scope. If someone uses another library allowing for drag and drop interaction on the page, there would be a conflict. If it's a requirement of a project, it should be a project specific decision and implemented in it.