Skip to content

Commit 7f9317d

Browse files
Chris LordCwiiis
Chris Lord
authored andcommitted
Fix invalidation when dpiScale is not equal to one
TileManager.pixelCoordsToTwipTileBounds needs to take into account dpiScale. Signed-off-by: Chris Lord <chris.lord@collabora.com> Change-Id: I3a6e4f93aa91df300f92dee126de78c317467c47
1 parent 05843e8 commit 7f9317d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

browser/src/app/TilesMiddleware.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1542,7 +1542,7 @@ class TileManager {
15421542

15431543
private static pixelCoordsToTwipTileBounds(coords: TileCoordData): number[] {
15441544
// We need to calculate pixelsToTwips for the scale of this tile. 15 is the ratio between pixels and twips when the scale is 1.
1545-
const pixelsToTwipsForTile = 15 / coords.scale;
1545+
const pixelsToTwipsForTile = 15 / app.dpiScale / coords.scale;
15461546
const x = coords.x * pixelsToTwipsForTile;
15471547
const y = coords.y * pixelsToTwipsForTile;
15481548
const width = app.tile.size.pX * pixelsToTwipsForTile;

0 commit comments

Comments
 (0)