From cc08d0f51be7ddcc0bff74bfd2c0f52c7bbca8b2 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 22 Apr 2022 17:23:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/shape/graph/SignalButton/index.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/jmapNew/shape/graph/SignalButton/index.js b/src/jmapNew/shape/graph/SignalButton/index.js index e98600481..afc38c55f 100644 --- a/src/jmapNew/shape/graph/SignalButton/index.js +++ b/src/jmapNew/shape/graph/SignalButton/index.js @@ -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() });