mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-09-12 07:10:07 +02:00
message: uncaught exception: y must be defined, line:0, :
stackTrace()@http://app.wisemapping.com/js/core.js:14
This commit is contained in:
parent
0a655ff802
commit
4288ad52dc
@ -46,7 +46,10 @@ mindplot.util.Shape =
|
||||
calculateRelationShipPointCoordinates:function (topic, controlPoint) {
|
||||
var size = topic.getSize();
|
||||
var position = topic.getPosition();
|
||||
var m = (position.y - controlPoint.y) / (position.x - controlPoint.x);
|
||||
var div = (position.x - controlPoint.x);
|
||||
div = (Math.mod(div) > 0.1 ? div : 0.1); // Prevent division by 0.
|
||||
|
||||
var m = (position.y - controlPoint.y) / div;
|
||||
var y, x;
|
||||
var gap = 5;
|
||||
if (controlPoint.y > position.y + (size.height / 2)) {
|
||||
@ -79,7 +82,9 @@ mindplot.util.Shape =
|
||||
calculateDefaultControlPoints:function (srcPos, tarPos) {
|
||||
var y = srcPos.y - tarPos.y;
|
||||
var x = srcPos.x - tarPos.x;
|
||||
var m = y / (x == 0 ? 1 : x); // Prevent division by 0.
|
||||
var div = (Math.abs(x) > 0.1 ? x : 0.1); // Prevent division by 0.
|
||||
|
||||
var m = y / div;
|
||||
var l = Math.sqrt(y * y + x * x) / 3;
|
||||
var fix = 1;
|
||||
if (srcPos.x > tarPos.x) {
|
||||
|
Loading…
Reference in New Issue
Block a user