From 671379e1c315021422452cdc5caab6e12b3d581f Mon Sep 17 00:00:00 2001 From: Ian Gilman Date: Thu, 29 Oct 2015 13:42:45 -0700 Subject: [PATCH] * Fixed an issue with TiledImage setPosition/setWidth/setHeight not reliably triggering a redraw (#720) --- changelog.txt | 1 + src/tiledimage.js | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 430571c7..df4a115b 100644 --- a/changelog.txt +++ b/changelog.txt @@ -33,6 +33,7 @@ OPENSEADRAGON CHANGELOG * Fixed overlays position (use rounding instead of flooring and ceiling) (#741) * Fixed issue with including overlays in your tileSources array when creating/opening in the viewer (#745) * Fixed issue in iOS devices that would cause all touch events to fail after a Multitasking Gesture was triggered (#744) +* Fixed an issue with TiledImage setPosition/setWidth/setHeight not reliably triggering a redraw (#720) 2.0.0: diff --git a/src/tiledimage.js b/src/tiledimage.js index a6943de4..1731d472 100644 --- a/src/tiledimage.js +++ b/src/tiledimage.js @@ -130,7 +130,7 @@ $.TiledImage = function( options ) { lastResetTime: 0, // Last time for which the tiledImage was reset. _midDraw: false, // Is the tiledImage currently updating the viewport? _needsDraw: true, // Does the tiledImage need to update the viewport again? - _hasOpaqueTile: false, // Do we have even one fully opaque tile? + _hasOpaqueTile: false, // Do we have even one fully opaque tile? //configurable settings springStiffness: $.DEFAULT_SETTINGS.springStiffness, @@ -502,6 +502,7 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag this._xSpring.resetTo(position.x); this._ySpring.resetTo(position.y); + this._needsDraw = true; } else { if (sameTarget) { return; @@ -509,6 +510,7 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag this._xSpring.springTo(position.x); this._ySpring.springTo(position.y); + this._needsDraw = true; } if (!sameTarget) { @@ -591,6 +593,7 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag this._scaleSpring.resetTo(scale); this._updateForScale(); + this._needsDraw = true; } else { if (sameTarget) { return; @@ -598,6 +601,7 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag this._scaleSpring.springTo(scale); this._updateForScale(); + this._needsDraw = true; } if (!sameTarget) {