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.
This commit is contained in:
Alistair Buxton 2021-03-26 11:18:21 +00:00
parent eebfdc1391
commit e6725871b8
2 changed files with 2 additions and 0 deletions

View File

@ -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

View File

@ -866,6 +866,7 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag
setFlip: function(flip) {
this.flipped = !!flip;
this._needsDraw = true;
this._raiseBoundsChange();
},
/**