代码调整

This commit is contained in:
joylink_cuiweidong 2022-04-22 17:23:12 +08:00
parent 6115eaa54e
commit cc08d0f51b

View File

@ -13,7 +13,8 @@ export default class SignalButton extends Group {
this.zlevel = model.zlevel;
this.z = 0;
this.model = model;
this.style = style.Line;
this.style = style;
// Line
this.create();
this.setState(model);
}
@ -96,7 +97,7 @@ export default class SignalButton extends Group {
shape: {
cx: model.position.x + 18 + 7,
cy: model.position.y + 7,
r: 7
r: 6
},
style: {
lineWidth: 0,
@ -147,14 +148,14 @@ export default class SignalButton extends Group {
this.recover();
if (model.type == 'CHANGE_DIRECTION') {
if (this.rectButton) {
if (this.pressDown) {
if (model.pressDown) {
this.rectButton.setStyle({ fill:'#FFFF00' });
this.arcFlash.show();
const style = this.model.style;
const style = this.style;
this.arcFlash.animateStyle(true)
.when(0, { fill: style.backgroundColor })
.when(1000, { stroke: '#FFFF00' })
.when(2000, { fill: style.backgroundColor })
.when(500, { fill: '#FFFF00' })
.when(1000, { fill: style.backgroundColor })
.start();
} else {
this.rectButton.setStyle({ fill:this.getTypeColor() });