diff --git a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/versionCompare/version.core.debug.js b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/versionCompare/version.core.debug.js index 8889470b..e0225878 100644 --- a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/versionCompare/version.core.debug.js +++ b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/versionCompare/version.core.debug.js @@ -1129,7 +1129,11 @@ const VersionDesigner = { let Model = PageModel[pos] if (h.linkerType == "curve" || h.linkerType == "broken") { if (!h.points || h.points.length == 0) { - h.points = Utils.getLinkerPoints(h) + try{ + h.points = Utils.getLinkerPoints(h) + }catch(e){ + console.log(e) + } } } var q = h.points; @@ -2517,19 +2521,23 @@ const Utils = { return this.getAngle(n, i) }, getAngle: function (f, e) { - var d = isNaN(Math.atan(Math.abs(f.y - e.y) / Math.abs(f.x - e.x))) ? 0 : Math.atan(Math.abs(f.y - e.y) / Math.abs(f.x - e.x)); - if (e.x <= f.x && e.y > f.y) { - d = Math.PI - d - } else { - if (e.x < f.x && e.y <= f.y) { - d = Math.PI + d + try { + var d = isNaN(Math.atan(Math.abs(f.y - e.y) / Math.abs(f.x - e.x))) ? 0 : Math.atan(Math.abs(f.y - e.y) / Math.abs(f.x - e.x)); + if (e.x <= f.x && e.y > f.y) { + d = Math.PI - d } else { - if (e.x >= f.x && e.y < f.y) { - d = Math.PI * 2 - d + if (e.x < f.x && e.y <= f.y) { + d = Math.PI + d + } else { + if (e.x >= f.x && e.y < f.y) { + d = Math.PI * 2 - d + } } } + return d + }catch (e) { + return 0 } - return d }, getLinkerLineStyle: function (pos, a, b) { let Model = PageModel[pos]