diff --git a/src/tiledimage.js b/src/tiledimage.js index 61de4e08..e2459660 100644 --- a/src/tiledimage.js +++ b/src/tiledimage.js @@ -866,7 +866,6 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag setFlip: function(flip) { this.flipped = !!flip; this._needsDraw = true; - this._raiseBoundsChange(); }, /** @@ -1501,7 +1500,7 @@ function getTile( tilesMatrix[ level ][ x ] = {}; } - if ( !tilesMatrix[ level ][ x ][ y ] ) { + if ( !tilesMatrix[ level ][ x ][ y ] || ((!!tilesMatrix[ level ][ x ][ y ].flipped) !== (!!tiledImage.flipped)) ) { xMod = ( numTiles.x + ( x % numTiles.x ) ) % numTiles.x; yMod = ( numTiles.y + ( y % numTiles.y ) ) % numTiles.y; bounds = tiledImage.getTileBounds( level, x, y ); @@ -1550,6 +1549,8 @@ function getTile( tile.isBottomMost = true; } + tile.flipped = tiledImage.flipped; + tilesMatrix[ level ][ x ][ y ] = tile; } @@ -1749,7 +1750,6 @@ function positionTile( tile, overlap, viewport, viewportCenter, levelVisibility, tile.size = sizeC; tile.squaredDistance = tileSquaredDistance; tile.visibility = levelVisibility; - tile.flipped = tiledImage.getFlip(); } /** diff --git a/test/demo/flipping.html b/test/demo/flipping.html index 080d0f68..f31b8ebc 100644 --- a/test/demo/flipping.html +++ b/test/demo/flipping.html @@ -36,7 +36,7 @@ First
- +
@@ -48,7 +48,7 @@ Second
- +