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

[client] un-invert the panning

This commit is contained in:
Starbeamrainbowlabs 2017-04-24 21:43:52 +01:00
parent bb084d70a4
commit d0ed30b6d3

View file

@ -314,8 +314,8 @@ class BoardWindow extends EventEmitter
// Store the viewport information for later // Store the viewport information for later
this.viewportState = event; this.viewportState = event;
this.viewport.x += event.dx * 1/this.viewport.zoomLevel; this.viewport.x -= event.dx * 1/this.viewport.zoomLevel;
this.viewport.y += event.dy * 1/this.viewport.zoomLevel; this.viewport.y -= event.dy * 1/this.viewport.zoomLevel;
this.viewport.zoomLevel += event.dz / 1000; this.viewport.zoomLevel += event.dz / 1000;
console.debug(`Viewport now at (${this.viewport.x}, ${this.viewport.y}) @ ${this.viewport.zoomLevel}x zoom`); console.debug(`Viewport now at (${this.viewport.x}, ${this.viewport.y}) @ ${this.viewport.zoomLevel}x zoom`);
} }