diff --git a/src/jmapNew/shape/Switch/index.js b/src/jmapNew/shape/Switch/index.js index 96b8a2e19..159deb9e2 100644 --- a/src/jmapNew/shape/Switch/index.js +++ b/src/jmapNew/shape/Switch/index.js @@ -151,8 +151,8 @@ export default class Switch extends Group { const arrowTextY = model.intersection.y + 15; const nameTextX = model.namePosition.x + model.intersection.x + directx * (style.Section.line.width * 3 + style.Switch.text.offset.x) * this.triangle.getCotRate(); const nameTextY = model.namePosition.y + model.intersection.y + style.Switch.text.offset.y * (style.Switch.text.position || directy); - const eTextX = nameTextX - const eTextY = nameTextY + (directy == 1? 6 * directy: 3 * directy); + const eTextX = nameTextX; + const eTextY = nameTextY + (directy == 1 ? 6 * directy : 3 * directy); this.name = new ESwName({ // 道岔名称 zlevel: this.zlevel, @@ -178,7 +178,7 @@ export default class Switch extends Group { fontSize: 12, text: 'E', textAlign: 'center', - textVerticalAlign: directy == 1 ? 'top': 'bottom', + textVerticalAlign: directy == 1 ? 'top' : 'bottom', textFill: 'yellow' } }); @@ -567,7 +567,26 @@ export default class Switch extends Group { section.show(); } if (sectionModel.cutOff) { - section.hide(); + // section.hide(); + // section.animateStyle(true, [ + // { time: 0, styles: { stroke: sectionModel.instance.line.section.style.stroke } }, + // { time: 1000, styles: { stroke: this.style.backgroundColor } }, + // { time: 2000, styles: { stroke: sectionModel.instance.line.section.style.stroke } } + // ]); + // const color = sectionModel.instance.line.section.style.stroke; + // section && section.animateStyle(item => { + // // item.animateStyle(true, [ + // // { time: 0, styles: { stroke: color } }, + // // { time: 500, styles: { stroke: this.style.backgroundColor } }, + // // { time: 1000, styles: { stroke: color } } + // // ]); + // item.animateStyle(true) + // // this.style.backgroundColor + // .when(0, { stroke: color }) + // .when(1000, { stroke:'#FF0000'}) + // .when(2000, { stroke:color }) + // .start(); + // }); } } setAshShow() {