状态灯调整

This commit is contained in:
fan 2020-03-24 16:50:09 +08:00
parent 652aa43a2a
commit 70b75e354c

View File

@ -62,10 +62,10 @@ export default class SaidLamp extends Group {
setState(model) { setState(model) {
if (!this.isShowShape) return; if (!this.isShowShape) return;
if (model._type === deviceType.PowerSupply && model.name.includes('2')) { if (model._type === deviceType.PowerSupply && model.name.includes('2')) {
this.control.setControlColor(this.deviceStyle.lamp.offColor); this.control && this.control.setControlColor(this.deviceStyle.lamp.offColor);
this.control.setControlStroke(this.deviceStyle.lamp.strokeColor, 1); this.control && this.control.setControlStroke(this.deviceStyle.lamp.strokeColor, 1);
} else if ((model._type === deviceType.AtsControl || model._type === deviceType.LocalControl || model._type === deviceType.ChainControl) && model.name.includes('B')) { } else if ((model._type === deviceType.AtsControl || model._type === deviceType.LocalControl || model._type === deviceType.ChainControl) && model.name.includes('B')) {
this.control.setControlColor(this.deviceStyle.lamp.offColor); this.control && this.control.setControlColor(this.deviceStyle.lamp.offColor);
} }
} }