bugfix - 判断条件不完整
This commit is contained in:
parent
d19e8eb3d9
commit
178d550db6
@ -213,8 +213,7 @@ export default class Switch extends Group {
|
||||
}
|
||||
});
|
||||
|
||||
if (this.style.Switch.switchDot.show) {
|
||||
console.log(this.style.Switch.switchDot.show)
|
||||
if (this.style.Switch.switchDot && this.style.Switch.switchDot.show) {
|
||||
const { drictx, dricty } = this.triangle
|
||||
this.dot = new ESwDot(model, drictx, dricty)
|
||||
this.add(this.dot)
|
||||
@ -516,7 +515,7 @@ export default class Switch extends Group {
|
||||
this.lockArc.setStyle({ stroke: this.style.Switch.arcBlcok.inversionColor });
|
||||
}
|
||||
}
|
||||
if (this.style.Switch.switchDot.show) {
|
||||
if (this.style.Switch.switchDot && this.style.Switch.switchDot.show) {
|
||||
this.dot.show()
|
||||
this.dot.setColor(this.style.Switch.switchDot.monoLockColor)
|
||||
}
|
||||
@ -573,7 +572,7 @@ export default class Switch extends Group {
|
||||
this.lockRect.setStyle({ stroke: this.style.Switch.rectLock.blockColor, fill: this.style.Switch.rectLock.blockFillColor });
|
||||
}
|
||||
}
|
||||
if (this.style.Switch.switchDot.show) {
|
||||
if (this.style.Switch.switchDot && this.style.Switch.switchDot.show) {
|
||||
this.dot.show()
|
||||
this.dot.setColor(this.style.Switch.switchDot.lockColor)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user