fix offset computation and usage

The incorrect offset is present since
db887df4aba500062827bad484ba3aacfe262339

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I3089a00cf297762b5280e841680590f65d2c73a4
This commit is contained in:
Dennis Francis 2020-12-23 11:33:33 +05:30 committed by Dennis Francis
parent 6fec3c791c
commit 599ec7ad37

View file

@ -229,9 +229,9 @@ L.CanvasTilePainter = L.Class.extend({
if (extendedBounds.intersects(tileBounds)) {
var offset = extendedBounds.getTopLeft();
viewBounds.x = Math.min(offset.x, viewBounds.min.x);
viewBounds.y = Math.min(offset.y, viewBounds.min.y);
this._drawTileInPane(tile, tileBounds, extendedBounds, extendedBounds.getTopLeft(), this._oscCtxs[i]);
offset.x = Math.min(offset.x, viewBounds.min.x);
offset.y = Math.min(offset.y, viewBounds.min.y);
this._drawTileInPane(tile, tileBounds, extendedBounds, offset, this._oscCtxs[i]);
}
}
},