mirror of
https://github.com/sbrl/Nibriboard.git
synced 2018-01-10 21:33:49 +00:00
Finish accounting for zoom level in the pencil
This commit is contained in:
parent
aec619a34b
commit
70ed434f1b
1 changed files with 2 additions and 2 deletions
|
@ -87,8 +87,8 @@ class Pencil
|
||||||
|
|
||||||
// The server only supports ints atm, so we have to round here :-(
|
// The server only supports ints atm, so we have to round here :-(
|
||||||
var nextPoint = new Vector(
|
var nextPoint = new Vector(
|
||||||
Math.floor((event.clientX + this.boardWindow.viewport.x) / this.boardWindow.viewport.zoomLevel),
|
Math.floor((event.clientX / this.boardWindow.viewport.zoomLevel) + this.boardWindow.viewport.x),
|
||||||
Math.floor((event.clientY + this.boardWindow.viewport.y) / this.boardWindow.viewport.zoomLevel)
|
Math.floor((event.clientY / this.boardWindow.viewport.zoomLevel) + this.boardWindow.viewport.y)
|
||||||
);
|
);
|
||||||
this.unsentSegments.push(nextPoint);
|
this.unsentSegments.push(nextPoint);
|
||||||
this.currentLineSegments.push(nextPoint);
|
this.currentLineSegments.push(nextPoint);
|
||||||
|
|
Loading…
Reference in a new issue