mirror of https://github.com/node-red/node-red.git
Fix null mouse_position on node import
parent
b6ba859510
commit
7348e475eb
|
@ -857,7 +857,11 @@ RED.view = function() {
|
|||
var root_node = new_ms[0].n;
|
||||
var dx = root_node.x;
|
||||
var dy = root_node.y;
|
||||
|
||||
|
||||
if (mouse_position == null) {
|
||||
mouse_position = [0,0];
|
||||
}
|
||||
|
||||
for (var i in new_ms) {
|
||||
new_ms[i].n.selected = true;
|
||||
new_ms[i].n.x -= dx - mouse_position[0];
|
||||
|
|
Loading…
Reference in New Issue