Closed vanithaak closed 1 year ago
@jywarren, please review my pr! For now I'm trying to make the downloaded file more readable.
hi @jywarren , I was trying to make the JSON pretty, with JSON.stringify( obj, undefined, "\t")(Also, tried null instead of undefined). Usually this works but it's not showing any tabs in downloaded file, rather it's showing "\t" . Is their anything else I can try?
OK, resuming here, we want to add a default generateExportJson(allImages = false) {
parameter, and a conditional (referencing this conversation: https://github.com/publiclab/Leaflet.DistortableImage/pull/1161#issuecomment-1284089852):
if (allImages || this.isCollected(layer)) {
Referencing this function could work like:
document.getElementById('export').onclick = function() { map.imgGroup.generateExportJson(true); }
Hello @jywarren, I've been able to integrate the downloadJSON trigger in the Export Images
button
Kindly review and let me know what you think.
Hello @jywarren, per our discussion here are the changes Let me know what you think, thank you!
Fixes #998 (<=== Add issue number here)
Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!
grunt test
If tests do fail, click on the red
X
to learn why by reading the logs.Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software
Thanks!
GIF
https://user-images.githubusercontent.com/59090053/197871579-8e525d12-dfcb-44c7-ad98-5a0789fa63b0.mp4
Screenshot