mirror of
https://github.com/sbrl/Nibriboard.git
synced 2018-01-10 21:33:49 +00:00
[client] Fix chunk loading at high zooms
This commit is contained in:
parent
4ff91f700b
commit
ce1f8545a6
1 changed files with 2 additions and 2 deletions
|
@ -50,8 +50,8 @@ class ChunkCache
|
||||||
let chunkArea = new Rectangle(
|
let chunkArea = new Rectangle(
|
||||||
Math.floor(visibleArea.x / chunkSize) * chunkSize,
|
Math.floor(visibleArea.x / chunkSize) * chunkSize,
|
||||||
Math.floor(visibleArea.y / chunkSize) * chunkSize,
|
Math.floor(visibleArea.y / chunkSize) * chunkSize,
|
||||||
(Math.ceil((visibleArea.x + (visibleArea.width)) / chunkSize) * chunkSize),
|
(Math.ceil((Math.abs(visibleArea.x) + (visibleArea.width)) / chunkSize) * chunkSize),
|
||||||
(Math.ceil((visibleArea.y + (visibleArea.height)) / chunkSize) * chunkSize)
|
(Math.ceil((Math.abs(visibleArea.y) + (visibleArea.height)) / chunkSize) * chunkSize)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue