mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Increased movement speed
This commit is contained in:
parent
b10e87d2b7
commit
fad483ce7a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user