From fad483ce7a2e53cb07bc6699c4cf76393a8be9df Mon Sep 17 00:00:00 2001 From: jdescottes Date: Sun, 23 Nov 2014 21:44:51 +0100 Subject: [PATCH] Increased movement speed --- src/js/controller/drawing/DragHandler.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/js/controller/drawing/DragHandler.js b/src/js/controller/drawing/DragHandler.js index 74be407b..8b1e59a6 100644 --- a/src/js/controller/drawing/DragHandler.js +++ b/src/js/controller/drawing/DragHandler.js @@ -1,6 +1,12 @@ (function () { 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 * Will store the initial coordinates as well as the status of the drag @@ -63,8 +69,8 @@ var currentOffset = this.drawingController.getOffset(); var offset = { - x : currentOffset.x - (coords.x - this.origin.x), - y : currentOffset.y - (coords.y - this.origin.y) + x : currentOffset.x - MULTIPLIER * (coords.x - this.origin.x), + y : currentOffset.y - MULTIPLIER * (coords.y - this.origin.y) }; return offset;