From e6725871b8138e0c253ac8b177ddf6eefb1433c7 Mon Sep 17 00:00:00 2001 From: Alistair Buxton Date: Fri, 26 Mar 2021 11:18:21 +0000 Subject: [PATCH] Make setFlip() update the navigator Makes setFlip() raise a bounds change, and makes the navigator copy the image flip in addition to the other properties, when receiving the bounds signal. --- src/navigator.js | 1 + src/tiledimage.js | 1 + 2 files changed, 2 insertions(+) diff --git a/src/navigator.js b/src/navigator.js index 9b64d2bd..5414a53e 100644 --- a/src/navigator.js +++ b/src/navigator.js @@ -452,6 +452,7 @@ $.extend( $.Navigator.prototype, $.EventSource.prototype, $.Viewer.prototype, /* myItem.setWidth(bounds.width, immediately); myItem.setRotation(theirItem.getRotation(), immediately); myItem.setClip(theirItem.getClip()); + myItem.setFlip(theirItem.getFlip()); }, // private diff --git a/src/tiledimage.js b/src/tiledimage.js index f6eb36f2..82e35ed7 100644 --- a/src/tiledimage.js +++ b/src/tiledimage.js @@ -866,6 +866,7 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag setFlip: function(flip) { this.flipped = !!flip; this._needsDraw = true; + this._raiseBoundsChange(); }, /**