Fix Curved line issue.

This commit is contained in:
Paulo Gustavo Veiga 2012-08-27 23:14:06 -03:00
parent 30c13905c0
commit 8f87359b78

View File

@ -79,7 +79,7 @@ mindplot.util.Shape =
calculateDefaultControlPoints:function (srcPos, tarPos) {
var y = srcPos.y - tarPos.y;
var x = srcPos.x - tarPos.x;
var m = y / x;
var m = y / (x == 0 ? 1 : x); // Prevent division by 0.
var l = Math.sqrt(y * y + x * x) / 3;
var fix = 1;
if (srcPos.x > tarPos.x) {