CanvasSectionContainer: Drag distance check is updated.
It wasn't detecting negative values. Signed-off-by: Gökay Şatır <gokay.satir@collabora.com> Change-Id: I93a633e84828ef18d1b4fc4246065421e63748b9
This commit is contained in:
parent
219af45449
commit
a591bc677f
1 changed files with 1 additions and 1 deletions
|
@ -316,7 +316,7 @@ class CanvasSectionContainer {
|
|||
this.mousePosition = this.convertPositionToCanvasLocale(e);
|
||||
if (this.positionOnMouseDown !== null && !this.draggingSomething) {
|
||||
var dragDistance = [this.mousePosition[0] - this.positionOnMouseDown[0], this.mousePosition[1] - this.positionOnMouseDown[1]];
|
||||
if (dragDistance[0] >= this.draggingTolerance || dragDistance[1] >= this.draggingTolerance) {
|
||||
if (Math.abs(dragDistance[0]) >= this.draggingTolerance || Math.abs(dragDistance[1]) >= this.draggingTolerance) {
|
||||
this.draggingSomething = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue