车站对应的小圆圈变灰

This commit is contained in:
joylink_zhaoerwei 2023-10-25 09:07:31 +08:00
parent cb39384b42
commit 22def6e5ff

View File

@ -25,13 +25,13 @@ export interface IStationLineData extends GraphicData {
const stationConsts = { const stationConsts = {
radius: 5, radius: 5,
borderWidth: 1, borderWidth: 1,
borderColor: '0xffffff', circleWhite: '0xffffff',
fillColor: '0xffffff', circleGray: '0xD5D5D5',
transferRadius: 3.5, transferRadius: 3.5,
transferWidth: 0.4, transferWidth: 0.4,
transferColor: '0xff0000', transferColor: '0xff0000',
codeOrange: '0xF48815', codeOrange: '0xF48815',
codeGray: 'D5D5D5', codeGray: '0xD5D5D5',
codeFontSize: 8, codeFontSize: 8,
codeOffsetY: 20, codeOffsetY: 20,
}; };
@ -52,14 +52,13 @@ class circleGraphic extends Container {
} }
draw(datas: IStationLineData): void { draw(datas: IStationLineData): void {
const circle = this.circle; const circle = this.circle;
circle.clear(); const fillColor =
circle.lineStyle( datas.color == 0 ? stationConsts.circleWhite : stationConsts.circleGray;
stationConsts.borderWidth, circle
new Color(stationConsts.borderColor) .clear()
); .lineStyle(stationConsts.borderWidth, new Color(fillColor))
circle.beginFill(stationConsts.fillColor, 1); .beginFill(fillColor, 1)
circle.drawCircle(0, 0, stationConsts.radius); .drawCircle(0, 0, stationConsts.radius).endFill;
circle.endFill;
const arcGraphicUp = this.arcUp; const arcGraphicUp = this.arcUp;
const arcGraphicDown = this.arcDown; const arcGraphicDown = this.arcDown;
const arrowUpGraphic = this.arrowUp; const arrowUpGraphic = this.arrowUp;