aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-08-22 14:13:34 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-08-23 14:04:28 +0100
commit09bc282208ee82a9f3e4ecc1f05c17ab012ef10d (patch)
treef7545c79d9e1b0cbd81b24799b327ed825256ab8 /web
parentf0f863865a270d9a508e8c3c273a31764555e60f (diff)
Fix redisplay of uploaded photo thumbnails.
Dropzone version 5 changed how createThumbnailFromUrl was called, so the upgrade in 30dd9d8 broke this.
Diffstat (limited to 'web')
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index 246a97b51..39117be4a 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -579,9 +579,13 @@ $.extend(fixmystreet.set_up, {
if (!f) {
return;
}
- var mockFile = { name: f, server_id: f };
+ var mockFile = { name: f, server_id: f, dataURL: '/photo/temp.' + f };
photodrop.emit("addedfile", mockFile);
- photodrop.createThumbnailFromUrl(mockFile, '/photo/temp.' + f);
+ photodrop.createThumbnailFromUrl(mockFile,
+ photodrop.options.thumbnailWidth, photodrop.options.thumbnailHeight,
+ photodrop.options.thumbnailMethod, true, function(thumbnail) {
+ photodrop.emit('thumbnail', mockFile, thumbnail);
+ });
photodrop.emit("complete", mockFile);
photodrop.options.maxFiles -= 1;
});