Skip to content

Commit

Permalink
refactor: Remove splitPos from non-calc path
Browse files Browse the repository at this point in the history
In calc, splitPos is used for frozen cells. As those can't exist
in other apps it makes no sense to keep the splitPos terms in the
calculations: they will always be zero

Signed-off-by: Skyler Grey <[email protected]>
Change-Id: I41b7135408402035773141b4af174e6c3f645ded
  • Loading branch information
Minion3665 committed Jan 24, 2025
1 parent 846ab21 commit db7bfc1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions browser/src/layer/tile/CanvasTileLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,8 @@ L.TileSectionManager = L.Class.extend({
newCenter = newTopLeftP.add(paneBounds.getSize().subtract(splitPos).divideBy(2)).multiplyBy(app.dpiScale);
} else {
const newPaneCenter = new L.Point(
(docTopLeft.x - splitPos.x + (paneSize.x + splitPos.x) * 0.5 / scale),
(docTopLeft.y - splitPos.y + (paneSize.y + splitPos.y) * 0.5 / scale));
(docTopLeft.x - paneSize.x * 0.5 / scale),
(docTopLeft.y - paneSize.y * 0.5 / scale));
newCenter = this._map.rescale(newPaneCenter, this._map.getZoom(), newZoom);
}

Expand Down

0 comments on commit db7bfc1

Please sign in to comment.