diff --git a/CHANGELOG.md b/CHANGELOG.md index 2191a69f2..65fe0a522 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## Version 1.8.3 + +### Improvements +- Better handle item changes with tile caching (#666) + ## Version 1.8.2 ### Improvements diff --git a/girder/girder_large_image/web_client/views/imageViewerWidget/base.js b/girder/girder_large_image/web_client/views/imageViewerWidget/base.js index b72adf65c..a05861fd8 100644 --- a/girder/girder_large_image/web_client/views/imageViewerWidget/base.js +++ b/girder/girder_large_image/web_client/views/imageViewerWidget/base.js @@ -6,6 +6,11 @@ import View from '@girder/core/views/View'; var ImageViewerWidget = View.extend({ initialize: function (settings) { this.itemId = settings.itemId; + let item = (settings.model || {}).attributes || {}; + this.updated = item.updated || item.created; + if (this.updated) { + this.updated = this.updated.replace(/:/g, '-').replace(/\+/g, '_'); + } // optional query parameters, such as {encoding: 'PNG'}, may be // undefined or null this.tileQueryDefaults = settings.tileQueryDefaults; @@ -39,6 +44,9 @@ var ImageViewerWidget = View.extend({ } var url = getApiRoot() + '/item/' + this.itemId + '/tiles/zxy/' + level + '/' + x + '/' + y; + if (this.updated) { + query = $.extend({_: this.updated}, query); + } if (query) { url += '?' + $.param(query); }