rt-sim-training-client/src/jmapNew/shape/SaidLamp/EDeviceStatus.js

96 lines
3.8 KiB
JavaScript
Raw Normal View History

import Group from 'zrender/src/container/Group';
import Text from 'zrender/src/graphic/Text';
export default class EDeviceStatus extends Group {
constructor(model) {
super();
this.model = model;
this.zlevel = model.zlevel;
this._subType = model._subType;
this.z = model.z;
this.create(model);
}
create(model) {
this.psd = new Text({
zlevel: this.zlevel,
z: this.z,
style: {
x: model.x,
y: model.y,
fontWeight: model.style.textStyle.fontWeight,
2020-04-14 15:45:13 +08:00
fontSize: model.style.FaultStatusGroup.fontSize,
fontFamily: model.style.fontFamily,
2020-04-14 15:45:13 +08:00
text: model.style.FaultStatusGroup.psd.text,
textFill: model.style.FaultStatusGroup.psd.defaultColor,
textAlign: model.style.textStyle.textAlign,
textVerticalAlign: model.style.textStyle.textVerticalAlign
}
});
this.mfa = new Text({
zlevel: this.zlevel,
z: this.z,
style: {
2020-04-14 15:45:13 +08:00
x: model.x + model.style.FaultStatusGroup.distance,
y: model.y,
fontWeight: model.style.textStyle.fontWeight,
2020-04-14 15:45:13 +08:00
fontSize: model.style.FaultStatusGroup.fontSize,
fontFamily: model.style.fontFamily,
2020-04-14 15:45:13 +08:00
text: model.style.FaultStatusGroup.mfa.text,
textFill: model.style.FaultStatusGroup.mfa.defaultColor,
textAlign: model.style.textStyle.textAlign,
textVerticalAlign: model.style.textStyle.textVerticalAlign
}
});
this.mfb = new Text({
zlevel: this.zlevel,
z: this.z,
style: {
2020-04-14 15:45:13 +08:00
x: model.x + model.style.FaultStatusGroup.distance * 2,
y: model.y,
fontWeight: model.style.textStyle.fontWeight,
2020-04-14 15:45:13 +08:00
fontSize: model.style.FaultStatusGroup.fontSize,
fontFamily: model.style.fontFamily,
2020-04-14 15:45:13 +08:00
text: model.style.FaultStatusGroup.mfb.text,
textFill: model.style.FaultStatusGroup.mfb.defaultColor,
textAlign: model.style.textStyle.textAlign,
textVerticalAlign: model.style.textStyle.textVerticalAlign
}
});
this.pfa = new Text({
zlevel: this.zlevel,
z: this.z,
style: {
2020-04-14 15:45:13 +08:00
x: model.x + model.style.FaultStatusGroup.distance * 3,
y: model.y,
fontWeight: model.style.textStyle.fontWeight,
2020-04-14 15:45:13 +08:00
fontSize: model.style.FaultStatusGroup.fontSize,
fontFamily: model.style.fontFamily,
2020-04-14 15:45:13 +08:00
text: model.style.FaultStatusGroup.pfa.text,
textFill: model.style.FaultStatusGroup.pfa.defaultColor,
textAlign: model.style.textStyle.textAlign,
textVerticalAlign: model.style.textStyle.textVerticalAlign
}
});
this.pfb = new Text({
zlevel: this.zlevel,
z: this.z,
style: {
2020-04-14 15:45:13 +08:00
x: model.x + model.style.FaultStatusGroup.distance * 4,
y: model.y,
fontWeight: model.style.textStyle.fontWeight,
2020-04-14 15:45:13 +08:00
fontSize: model.style.FaultStatusGroup.fontSize,
fontFamily: model.style.fontFamily,
2020-04-14 15:45:13 +08:00
text: model.style.FaultStatusGroup.pfb.text,
textFill: model.style.FaultStatusGroup.pfb.defaultColor,
textAlign: model.style.textStyle.textAlign,
textVerticalAlign: model.style.textStyle.textVerticalAlign
}
});
this.add(this.psd);
this.add(this.mfa);
this.add(this.mfb);
this.add(this.pfa);
this.add(this.pfb);
}
}