实训占位符调整&皮肤调整

This commit is contained in:
fan 2020-04-08 14:06:45 +08:00
parent 013360534b
commit f495a2d560
3 changed files with 18 additions and 2 deletions

View File

@ -1,5 +1,6 @@
const mapDeviceStyle = {
'01': 'chengdu_01',
// '01': 'xian_02'
'02': 'fuzhou_01',
'03': 'bejing_01',
'04': 'chengdu_03',

View File

@ -137,7 +137,8 @@ class SkinCode extends defaultStyle {
standardLength: 7, // 高柱长度
standardHeight: 6, // 灯柱高度
standardColor: '#fff', // 灯柱颜色
standardWidth: 3 // 灯柱宽度
standardWidth: 3, // 灯柱宽度
autoRouteColor: '#008000' // 自动进路开启灯柱颜色
},
text: {
show: true, // 信号机名称显示

View File

@ -88,7 +88,7 @@ class Signal extends Group {
z: this.z - 1,
shape: {
x: signalRect.x - style.Signal.sigBack.distanceX,
y: signalRect.y - style.Signal.sigBack.distanceY,
y: signalRect.y + style.Signal.sigBack.distanceY,
width: signalRect.width + 2 * style.Signal.sigBack.distanceX,
height: signalRect.height - 2 * style.Signal.sigBack.distanceY
},
@ -97,6 +97,8 @@ class Signal extends Group {
fill: style.Signal.sigBack.color
}
});
this.add(this.sigBack);
this.sigBack.hide();
}
// 信号机名称
const sigNameX = model.position.x + model.positionPoint.x - drict * (style.Signal.post.standardWidth) + model.namePosition.x;
@ -311,6 +313,15 @@ class Signal extends Group {
this.sigName.setStyle({ textBorderWidth: 1 });
this.sigName.setColor('#fff');
}
// if (this.style.Signal.sigBack) {
// this.sigBack.show();
// this.sigBack.animateStyle(true)
// .when(0, { fill: this.style.backgroundColor })
// .when(1000, { fill: this.style.Signal.sigBack.color })
// .when(2000, { fill: this.style.backgroundColor })
// .when(3000, { fill: this.style.Signal.sigBack.color })
// .start();
// }
}
// 功能封锁
@ -366,6 +377,9 @@ class Signal extends Group {
this.sigName.setColor(this.style.Signal.text.AutoRouteColor);
this.setAutoClose();
}
if (this.style.Signal.post.autoRouteColor) {
this.sigPost.setColor(this.style.Signal.post.autoRouteColor);
}
}
// 信号机进路自动触发模式状态类型