mirror of
https://github.com/sbrl/Nibriboard.git
synced 2018-01-10 21:33:49 +00:00
[client] Account for zoom when rendering chunks.
This commit is contained in:
parent
00117a35a9
commit
b043362f29
1 changed files with 1 additions and 1 deletions
|
@ -221,6 +221,7 @@ class BoardWindow extends EventEmitter
|
|||
context.clearRect(0, 0, canvas.width, canvas.height);
|
||||
|
||||
context.save();
|
||||
context.scale(this.viewport.zoomLevel, this.viewport.zoomLevel);
|
||||
|
||||
// Draw the grid if it's enabled
|
||||
if(this.displayGrid)
|
||||
|
@ -243,7 +244,6 @@ class BoardWindow extends EventEmitter
|
|||
renderGrid(canvas, context)
|
||||
{
|
||||
context.save();
|
||||
context.scale(this.viewport.zoomLevel, this.viewport.zoomLevel);
|
||||
|
||||
|
||||
for(let ax = (this.viewport.x + (this.gridSize - (this.viewport.x % this.gridSize))) - this.gridSize; ax < (this.viewport.x + this.viewport.width); ax += this.gridSize)
|
||||
|
|
Loading…
Reference in a new issue