makinacorpus / Leaflet.FileLayer

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

Allow to select multiple files in the file dialog #15

Closed jens-duttke closed 8 years ago

jens-duttke commented 10 years ago

Extend the file dialog by the possibility to select multiple files at once.

leplatrem commented 10 years ago

Thanks for this contribution !

Would you mind adding a small test in test/test.filelayer.js please ?

You can install the tests tools using this command : make test.

To run the test suite from command line requires phantomjs to be installed on your system. But you can also open test/index.html in your browser to see the results.

jens-duttke commented 10 years ago

Sure, I'll do that - unfortunately not before the weekend.

Many regards, Jens Duttke

Am 18.08.2014 um 09:53 schrieb Mathieu Leplatre notifications@github.com:

Thanks for this contribution !

Would you mind adding a small test in test/test.filelayer.js please ?

You can install the tests tools using this command : make test.

To run the test suite from command line requires phantomjs to be installed on your system. But you can also open test/index.html in your browser to see the results.

— Reply to this email directly or view it on GitHub.

leplatrem commented 9 years ago

Hi Jens, Could take a look at the tests ? Thanks !

jens-duttke commented 9 years ago

Hello leplatrem,

in August I tried to install all npm packages using "npm install", after 3 hours I aborted the installation process. In that time npm created an endless structure of folders, which I wasn't able to delete with Windows tools, I had to download a special tool which was able to get rid of all the files. I think there was a circular reference in the mocha package, or maybe a bug in npm.

Whatever, I've tried it again now, and it downloaded the packages in less than 10 seconds without problems.

But now I have the next problem, I'm not sure how to great an automatic unit test for that. How would you test the opening of multiple files especially using drag&drop? To me it looks like there are no unittests for that, which I could use as base for my tests.

leplatrem commented 9 years ago

Hi,

Thanks for coming back :) Sorry for the delay, I don't work for the company anymore :|

Indeed, there might not be too much tests already there. Maybe you could just add a small test to check that the input field has the 'multiple' option. It would be a symbolic test, but at least it proves that our intentions are to test the changes of this PR :)

fredericbonifas commented 8 years ago

Thanks for the PR @jens-duttke !

I merged your PR, adding a test to assert that the input has the 'multiple' option