check for mouse start on mouse end
This commit is contained in:
parent
0a9256eb36
commit
d7ab9c93d6
1 changed files with 2 additions and 1 deletions
|
|
@ -505,7 +505,7 @@
|
||||||
x: (event.clientX / width()) * 2 - 1,
|
x: (event.clientX / width()) * 2 - 1,
|
||||||
y: -(event.clientY / height()) * 2 + 1};
|
y: -(event.clientY / height()) * 2 + 1};
|
||||||
// only fire on mouse move between mouseStart (down) and up
|
// only fire on mouse move between mouseStart (down) and up
|
||||||
if (mouseEnd.x - mouseStart.x + mouseEnd.y - mouseStart.y === 0) {
|
if (mouseStart && mouseEnd.x - mouseStart.x + mouseEnd.y - mouseStart.y === 0) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
let refresh = false,
|
let refresh = false,
|
||||||
selection = null;
|
selection = null;
|
||||||
|
|
@ -523,6 +523,7 @@
|
||||||
platformClick(platformClickAt);
|
platformClick(platformClickAt);
|
||||||
}
|
}
|
||||||
if (refresh) requestRefresh();
|
if (refresh) requestRefresh();
|
||||||
|
mouseStart = null;
|
||||||
} else if (mouseDrag && mouseDragStart) {
|
} else if (mouseDrag && mouseDragStart) {
|
||||||
mouseDrag(null,null,true);
|
mouseDrag(null,null,true);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue