1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Fix null mouse_position on node import

This commit is contained in:
Nicholas O'Leary 2013-09-20 16:52:07 +01:00
parent b6ba859510
commit 7348e475eb

View File

@ -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];