车站微调

This commit is contained in:
joylink_zhaoerwei 2023-06-01 13:41:53 +08:00
parent bb9e8345bd
commit 9be2d014bc

View File

@ -26,13 +26,13 @@ export class Station extends JlGraphic {
constructor() { constructor() {
super(Station.Type); super(Station.Type);
this.addChild(this.codeGraph); this.addChild(this.codeGraph);
this.codeGraph.setVectorFontSize(22);
} }
get datas(): IStationData { get datas(): IStationData {
return this.getDatas<IStationData>(); return this.getDatas<IStationData>();
} }
doRepaint(): void { doRepaint(): void {
this.position.set(this.datas.point.x, this.datas.point.y);
const codeGraph = this.codeGraph; const codeGraph = this.codeGraph;
if (this.datas.code == '') { if (this.datas.code == '') {
codeGraph.text = '车站Station'; codeGraph.text = '车站Station';
@ -42,7 +42,6 @@ export class Station extends JlGraphic {
codeGraph.style.fill = this.datas.codeColor; codeGraph.style.fill = this.datas.codeColor;
codeGraph.setVectorFontSize(this.datas.codeFontSize); codeGraph.setVectorFontSize(this.datas.codeFontSize);
codeGraph.anchor.set(0.5); codeGraph.anchor.set(0.5);
codeGraph.position.set(this.datas.point.x, this.datas.point.y);
codeGraph.style.fill = this.datas.codeColor; codeGraph.style.fill = this.datas.codeColor;
} }
} }