diff --git a/src/Common/Singleton.ts b/src/Common/Singleton.ts index 5e1d4e2d2..8f4b8f9ff 100644 --- a/src/Common/Singleton.ts +++ b/src/Common/Singleton.ts @@ -25,13 +25,13 @@ export class Singleton */ static GetInstance(Class: { new(): T; }): T { - let obj = this.singletonMap.get(Class); - if (!obj) + let instance = this.singletonMap.get(Class); + if (!instance) { - obj = new Class(); - this.singletonMap.set(Class, obj); + instance = new Class(); + this.singletonMap.set(Class, instance); } - return obj; + return instance; } /** diff --git a/src/DatabaseServices/Arc.ts b/src/DatabaseServices/Arc.ts index 45792a011..380c80b5b 100644 --- a/src/DatabaseServices/Arc.ts +++ b/src/DatabaseServices/Arc.ts @@ -615,9 +615,9 @@ export class Arc extends Curve let pts = [this.StartPoint, this.EndPoint]; let [sp, ep] = pts; - let OldChordLengthHalf = sp.distanceTo(ep) * 0.5; + let oldChordLengthHalf = sp.distanceTo(ep) * 0.5; - let arcHeight = OldChordLengthHalf * this.Bul; + let arcHeight = oldChordLengthHalf * this.Bul; pts[index].add(vec); diff --git a/src/DatabaseServices/Polyline.ts b/src/DatabaseServices/Polyline.ts index 58f5a4e1d..44a32ca26 100644 --- a/src/DatabaseServices/Polyline.ts +++ b/src/DatabaseServices/Polyline.ts @@ -1042,14 +1042,14 @@ export class Polyline extends Curve let notChangeP = this.GetPointAtParam(nextIndex); //原先的弦长的一半 - let OldChordLengthHalf = needChangeP.distanceTo(notChangeP) * 0.5; + let oldChordLengthHalf = needChangeP.distanceTo(notChangeP) * 0.5; //弓高 - let arcHeight = OldChordLengthHalf * d.bul; + let arcHeight = oldChordLengthHalf * d.bul; needChangeP.add(vec); - let newChordLengthHalf = (needChangeP.distanceTo(notChangeP) * 0.5); + let newChordLengthHalf = needChangeP.distanceTo(notChangeP) * 0.5; d.bul = arcHeight / newChordLengthHalf; }