1
0
Fork 0
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:
Starbeamrainbowlabs 2017-06-15 17:25:11 +01:00
parent 4ff91f700b
commit ce1f8545a6

View file

@ -50,8 +50,8 @@ class ChunkCache
let chunkArea = new Rectangle(
Math.floor(visibleArea.x / chunkSize) * chunkSize,
Math.floor(visibleArea.y / chunkSize) * chunkSize,
(Math.ceil((visibleArea.x + (visibleArea.width)) / chunkSize) * chunkSize),
(Math.ceil((visibleArea.y + (visibleArea.height)) / chunkSize) * chunkSize)
(Math.ceil((Math.abs(visibleArea.x) + (visibleArea.width)) / chunkSize) * chunkSize),
(Math.ceil((Math.abs(visibleArea.y) + (visibleArea.height)) / chunkSize) * chunkSize)
);