[MERGE] upstream fixes

bzr revid: xmo@openerp.com-20111026121856-q9cso26sh2mp6b3s
This commit is contained in:
Xavier Morel 2011-10-26 14:18:56 +02:00
parent d47d63357c
commit 534da7c07b
1 changed files with 2 additions and 0 deletions

View File

@ -378,6 +378,8 @@ Graph.Layout.Spring.prototype = {
},
layoutRepulsive: function(node1, node2) {
if (typeof node1 == 'undefined' || typeof node2 == 'undefined')
return;
var dx = node2.layoutPosX - node1.layoutPosX;
var dy = node2.layoutPosY - node1.layoutPosY;
var d2 = dx * dx + dy * dy;