1
0
Fork 0
mirror of https://github.com/sbrl/Nibriboard.git synced 2018-01-10 21:33:49 +00:00

Start accounting for the zoom level when drawaing things to the screen

This commit is contained in:
Starbeamrainbowlabs 2017-06-12 18:53:32 +01:00
parent 62dd7af656
commit aec619a34b

View file

@ -87,8 +87,8 @@ class Pencil
// The server only supports ints atm, so we have to round here :-(
var nextPoint = new Vector(
Math.floor(event.clientX + this.boardWindow.viewport.x),
Math.floor(event.clientY + this.boardWindow.viewport.y)
Math.floor((event.clientX + this.boardWindow.viewport.x) / this.boardWindow.viewport.zoomLevel),
Math.floor((event.clientY + this.boardWindow.viewport.y) / this.boardWindow.viewport.zoomLevel)
);
this.unsentSegments.push(nextPoint);
this.currentLineSegments.push(nextPoint);