Merge branch 'apps_dev_ydq_sjdb' into apps_4_test

This commit is contained in:
袁东强 2025-07-21 16:28:35 +08:00
commit 40f0e93d8b

View File

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