Increased movement speed

This commit is contained in:
jdescottes 2014-11-23 21:44:51 +01:00
parent b10e87d2b7
commit fad483ce7a

View File

@ -1,6 +1,12 @@
(function () { (function () {
var ns = $.namespace('pskl.controller.drawing'); var ns = $.namespace('pskl.controller.drawing');
/**
* Multiplier applied between the mouse movement and viewport movement
* @type {Number}
*/
var MULTIPLIER = 2;
/** /**
* Dedicated handler to drag the drawing canvas using the mouse * Dedicated handler to drag the drawing canvas using the mouse
* Will store the initial coordinates as well as the status of the drag * Will store the initial coordinates as well as the status of the drag
@ -63,8 +69,8 @@
var currentOffset = this.drawingController.getOffset(); var currentOffset = this.drawingController.getOffset();
var offset = { var offset = {
x : currentOffset.x - (coords.x - this.origin.x), x : currentOffset.x - MULTIPLIER * (coords.x - this.origin.x),
y : currentOffset.y - (coords.y - this.origin.y) y : currentOffset.y - MULTIPLIER * (coords.y - this.origin.y)
}; };
return offset; return offset;