mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Node drag start threshold incorrectly calculated
This commit is contained in:
parent
57ae297efd
commit
04673c65f4
@ -427,9 +427,12 @@ RED.view = (function() {
|
||||
);
|
||||
d3.event.preventDefault();
|
||||
} else if (mouse_mode == RED.state.MOVING) {
|
||||
mousePos = mouse_position;
|
||||
mousePos = d3.mouse(document.body);
|
||||
if (isNaN(mousePos[0])) {
|
||||
mousePos = d3.touches(document.body)[0];
|
||||
}
|
||||
var d = (mouse_offset[0]-mousePos[0])*(mouse_offset[0]-mousePos[0]) + (mouse_offset[1]-mousePos[1])*(mouse_offset[1]-mousePos[1]);
|
||||
if (d > 2) {
|
||||
if (d > 3) {
|
||||
mouse_mode = RED.state.MOVING_ACTIVE;
|
||||
clickElapsed = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user