From d631c42eb418bdddc16d49ab1068826e5aee43b1 Mon Sep 17 00:00:00 2001 From: jywarren Date: Tue, 2 Jul 2019 18:43:24 -0400 Subject: [PATCH 1/3] fix for cache bust --- dist/leaflet.distortableimage.js | 2 +- package.json | 2 +- src/DistortableCollection.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/leaflet.distortableimage.js b/dist/leaflet.distortableimage.js index 6d8c73ed6..94a1b429b 100644 --- a/dist/leaflet.distortableimage.js +++ b/dist/leaflet.distortableimage.js @@ -848,7 +848,7 @@ L.DistortableCollection = L.FeatureGroup.extend({ // this may be overridden to integrate with any UI function _defaultHandleStatusUrl(data) { console.log(data); - statusUrl = "//export.mapknitter.org" + data; + statusUrl = "//export.mapknitter.org" + data + "?" + Date.now(); // bust cache with timestamp opts.updater = opts.updater || _defaultUpdater; // repeatedly fetch the status.json diff --git a/package.json b/package.json index cc1db16a0..856dfa32d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "leaflet-distortableimage", - "version": "0.5.0", + "version": "0.5.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/DistortableCollection.js b/src/DistortableCollection.js index e3e0c38df..bb2599f24 100644 --- a/src/DistortableCollection.js +++ b/src/DistortableCollection.js @@ -366,7 +366,7 @@ L.DistortableCollection = L.FeatureGroup.extend({ // this may be overridden to integrate with any UI function _defaultHandleStatusUrl(data) { console.log(data); - statusUrl = "//export.mapknitter.org" + data; + statusUrl = "//export.mapknitter.org" + data + "?" + Date.now(); // bust cache with timestamp opts.updater = opts.updater || _defaultUpdater; // repeatedly fetch the status.json From 20cdf3a093a9d798e3d928e6686268d6598432d7 Mon Sep 17 00:00:00 2001 From: jywarren Date: Tue, 2 Jul 2019 18:53:18 -0400 Subject: [PATCH 2/3] fix --- dist/leaflet.distortableimage.js | 4 ++-- src/DistortableCollection.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/leaflet.distortableimage.js b/dist/leaflet.distortableimage.js index 94a1b429b..d359ebf3e 100644 --- a/dist/leaflet.distortableimage.js +++ b/dist/leaflet.distortableimage.js @@ -848,12 +848,12 @@ L.DistortableCollection = L.FeatureGroup.extend({ // this may be overridden to integrate with any UI function _defaultHandleStatusUrl(data) { console.log(data); - statusUrl = "//export.mapknitter.org" + data + "?" + Date.now(); // bust cache with timestamp + statusUrl = "//export.mapknitter.org" + data; // bust cache with timestamp opts.updater = opts.updater || _defaultUpdater; // repeatedly fetch the status.json updateInterval = setInterval(function intervalUpdater() { - $.ajax(statusUrl, { + $.ajax(statusUrl + "?" + Date.now(), { type: "GET", crossDomain: true }).done(function(data) { diff --git a/src/DistortableCollection.js b/src/DistortableCollection.js index bb2599f24..1d2244c65 100644 --- a/src/DistortableCollection.js +++ b/src/DistortableCollection.js @@ -366,12 +366,12 @@ L.DistortableCollection = L.FeatureGroup.extend({ // this may be overridden to integrate with any UI function _defaultHandleStatusUrl(data) { console.log(data); - statusUrl = "//export.mapknitter.org" + data + "?" + Date.now(); // bust cache with timestamp + statusUrl = "//export.mapknitter.org" + data; // bust cache with timestamp opts.updater = opts.updater || _defaultUpdater; // repeatedly fetch the status.json updateInterval = setInterval(function intervalUpdater() { - $.ajax(statusUrl, { + $.ajax(statusUrl + "?" + Date.now(), { type: "GET", crossDomain: true }).done(function(data) { From fe575a0e83984f1f675712a024af0acfa214b673 Mon Sep 17 00:00:00 2001 From: jywarren Date: Tue, 2 Jul 2019 18:57:14 -0400 Subject: [PATCH 3/3] move comment --- dist/leaflet.distortableimage.js | 4 ++-- src/DistortableCollection.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/leaflet.distortableimage.js b/dist/leaflet.distortableimage.js index d359ebf3e..ebcf90b15 100644 --- a/dist/leaflet.distortableimage.js +++ b/dist/leaflet.distortableimage.js @@ -848,12 +848,12 @@ L.DistortableCollection = L.FeatureGroup.extend({ // this may be overridden to integrate with any UI function _defaultHandleStatusUrl(data) { console.log(data); - statusUrl = "//export.mapknitter.org" + data; // bust cache with timestamp + statusUrl = "//export.mapknitter.org" + data; opts.updater = opts.updater || _defaultUpdater; // repeatedly fetch the status.json updateInterval = setInterval(function intervalUpdater() { - $.ajax(statusUrl + "?" + Date.now(), { + $.ajax(statusUrl + "?" + Date.now(), { // bust cache with timestamp type: "GET", crossDomain: true }).done(function(data) { diff --git a/src/DistortableCollection.js b/src/DistortableCollection.js index 1d2244c65..adf4be087 100644 --- a/src/DistortableCollection.js +++ b/src/DistortableCollection.js @@ -366,12 +366,12 @@ L.DistortableCollection = L.FeatureGroup.extend({ // this may be overridden to integrate with any UI function _defaultHandleStatusUrl(data) { console.log(data); - statusUrl = "//export.mapknitter.org" + data; // bust cache with timestamp + statusUrl = "//export.mapknitter.org" + data; opts.updater = opts.updater || _defaultUpdater; // repeatedly fetch the status.json updateInterval = setInterval(function intervalUpdater() { - $.ajax(statusUrl + "?" + Date.now(), { + $.ajax(statusUrl + "?" + Date.now(), { // bust cache with timestamp type: "GET", crossDomain: true }).done(function(data) {