From c5366630f57065dab79d7e4df1345800f7d3a539 Mon Sep 17 00:00:00 2001 From: Sasha Boginsky <41092741+sashadev-sky@users.noreply.github.com> Date: Sun, 12 Jan 2020 18:22:48 -0500 Subject: [PATCH] Fix export bug (#521) * Fix line break unix v windows * fix clear interval bug that causes infinite alert loop --- dist/leaflet.distortableimage.js | 2 +- package-lock.json | 2 +- package.json | 2 +- src/edit/DistortableCollection.Edit.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/leaflet.distortableimage.js b/dist/leaflet.distortableimage.js index a04bc29cf..b546b443e 100644 --- a/dist/leaflet.distortableimage.js +++ b/dist/leaflet.distortableimage.js @@ -3115,7 +3115,7 @@ L.DistortableCollection.Edit = L.Handler.extend({ } if (data.status === 'complete') { - clearInterval(this.updateInterval); + clearInterval(self.updateInterval); resolve(); if (data.jpg !== null) { alert('Export succeeded. ' + opts.exportUrl + data.jpg); diff --git a/package-lock.json b/package-lock.json index b741707cb..645a5d930 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "leaflet-distortableimage", - "version": "0.11.0", + "version": "0.11.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 74b051ab8..f211c61d2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "leaflet-distortableimage", - "version": "0.11.0", + "version": "0.11.1", "description": "Leaflet plugin enabling image overlays to be distorted, stretched, and warped (built for Public Lab's MapKnitter: http://publiclab.org).", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", diff --git a/src/edit/DistortableCollection.Edit.js b/src/edit/DistortableCollection.Edit.js index a805caeb9..f346245ff 100644 --- a/src/edit/DistortableCollection.Edit.js +++ b/src/edit/DistortableCollection.Edit.js @@ -274,7 +274,7 @@ L.DistortableCollection.Edit = L.Handler.extend({ } if (data.status === 'complete') { - clearInterval(this.updateInterval); + clearInterval(self.updateInterval); resolve(); if (data.jpg !== null) { alert('Export succeeded. ' + opts.exportUrl + data.jpg);