修改代码

This commit is contained in:
ival 2019-07-16 13:43:37 +08:00
parent ab934855d8
commit dd21cc3294
2 changed files with 29 additions and 31 deletions

View File

@ -557,36 +557,36 @@ export default class Section extends Group {
});
this.add(this.sectionText);
// if (!model.isSwitchSection) {
// this.sectionTextBorder = new Rect({
// zlevel: model.zlevel + 3,
// z: 5,
// shape: this.sectionText.getBoundingRect(),
// style: {
// lineDash: [3, 3],
// stroke: '#fff', // 白色
// fill: model.type == '02' ? style.sectionLogicalBackgroundColor : '#00FFFF' // 蓝色
// }
// });
// this.add(this.sectionTextBorder);
// }
if (!model.isSwitchSection) {
this.sectionTextBorder = new Rect({
zlevel: model.zlevel + 3,
z: 5,
shape: this.sectionText.getBoundingRect(),
style: {
lineDash: [3, 3],
stroke: '#fff', // 白色
fill: model.type == '02' ? style.sectionLogicalBackgroundColor : '#00FFFF' // 蓝色
}
});
this.add(this.sectionTextBorder);
}
// this.sectionTextShadow = new Text({
// zlevel: this.zlevel + 3,
// z: 5,
// position: [4, -2],
// silent: true,
// style: {
// x: tempx,
// y: tempy,
// text: model.name,
// textFill: style.textShadowColor, // 黄色
// textAlign: 'middle',
// textVerticalAlign: 'top',
// textFont: 'bold ' + (fontSize + 1) + 'px ' + style.textFontFormat
// }
// });
// this.add(this.sectionTextShadow);
this.sectionTextShadow = new Text({
zlevel: this.zlevel + 3,
z: 5,
position: [4, -2],
silent: true,
style: {
x: tempx,
y: tempy,
text: model.name,
textFill: style.textShadowColor, // 黄色
textAlign: 'middle',
textVerticalAlign: 'top',
textFont: 'bold ' + (fontSize + 1) + 'px ' + style.textFontFormat
}
});
this.add(this.sectionTextShadow);
}
/** 站台轨名称*/

View File

@ -37,8 +37,6 @@ function shapefactory(type, device, jmap) {
const style = jmap.getStyleDict();
const shape = mapShape[type];
if (shape instanceof Function) {
console.log(style, type);
// eslint-disable-next-line
return new shape(device, style, jmap);
}
}