fix: missing zoom-animation for Draw
Conflicts: loleaflet/src/layer/tile/TilesSection.ts Signed-off-by: Dennis Francis <dennis.francis@collabora.com> Change-Id: I260a5bf08751087edad9abfeaa2a68c4c7ac914e (cherry picked from commit bae749a85a3b22c8cdc3da052aeb2298e6fc37ec)
This commit is contained in:
parent
04c11fef54
commit
e279e4be87
1 changed files with 4 additions and 2 deletions
|
@ -181,13 +181,15 @@ class TilesSection {
|
|||
}
|
||||
|
||||
if (app.file.fileBasedView) {
|
||||
var tileSize = this.sectionProperties.docLayer._tileSize;
|
||||
var tileSize = this.sectionProperties.docLayer._tileSize;
|
||||
var ratio = tileSize / this.sectionProperties.docLayer._tileHeightTwips;
|
||||
var partHeightPixels = Math.round((this.sectionProperties.docLayer._partHeightTwips + this.sectionProperties.docLayer._spaceBetweenParts) * ratio);
|
||||
|
||||
offset.y = tile.coords.part * partHeightPixels + tile.coords.y - this.documentTopLeft[1];
|
||||
extendedOffset.y = offset.y + halfExtraSize;
|
||||
|
||||
this.context.drawImage(tile.el, offset.x, offset.y, tileSize, tileSize);
|
||||
this.oscCtxs[0].drawImage(tile.el, extendedOffset.x, extendedOffset.y, tileSize, tileSize);
|
||||
}
|
||||
else {
|
||||
this.context.drawImage(tile.el, offset.x, offset.y, ctx.tileSize.x, ctx.tileSize.y);
|
||||
|
@ -408,4 +410,4 @@ class TilesSection {
|
|||
|
||||
L.getNewTilesSection = function () {
|
||||
return new TilesSection();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue