This commit is contained in:
joylink_zhaoerwei 2024-01-10 16:06:50 +08:00
parent 8afd91f515
commit 3c3a0a2ecb
4 changed files with 9 additions and 9 deletions

View File

@ -1,10 +1,10 @@
import { GraphicState } from 'jl-graphic';
import { JlPlatform } from './JlPlatform';
export interface IBeiJingPlatformState extends GraphicState {
export interface IGPPlatformState extends GraphicState {
id?: number;
}
export declare class GPPlatform extends JlPlatform {
constructor();
get states(): IBeiJingPlatformState;
get states(): IGPPlatformState;
doRepaint(): void;
}

View File

@ -2,12 +2,12 @@ import { JlGraphicTemplate } from 'jl-graphic';
import { JlPlatform } from './JlPlatform';
import { IPlatformData } from './PlatformConfig';
import { ITHPlatformState } from './THPlatform';
import { IBeiJingPlatformState } from './GPPlatform';
import { IGPPlatformState } from './GPPlatform';
import { StyleType } from 'common/common';
export declare class PlatformTemplate extends JlGraphicTemplate<JlPlatform> {
hasdoor?: boolean;
direction?: string;
styleType: StyleType;
constructor(dataTemplate: IPlatformData, stateTemplate: ITHPlatformState | IBeiJingPlatformState, styleType: StyleType);
constructor(dataTemplate: IPlatformData, stateTemplate: ITHPlatformState | IGPPlatformState, styleType: StyleType);
new(): JlPlatform;
}

View File

@ -2,7 +2,7 @@ import { GraphicState } from 'jl-graphic';
import { GPConsts } from './PlatformConfig';
import { JlPlatform } from './JlPlatform';
export interface IBeiJingPlatformState extends GraphicState {
export interface IGPPlatformState extends GraphicState {
id?: number;
}
@ -10,8 +10,8 @@ export class GPPlatform extends JlPlatform {
constructor() {
super(GPConsts);
}
get states(): IBeiJingPlatformState {
return this.getStates<IBeiJingPlatformState>();
get states(): IGPPlatformState {
return this.getStates<IGPPlatformState>();
}
doRepaint(): void {
this.rectGraphic.stateFillColor = GPConsts.noTrainStop;

View File

@ -2,7 +2,7 @@ import { JlGraphicTemplate } from 'jl-graphic';
import { JlPlatform } from './JlPlatform';
import { IPlatformData } from './PlatformConfig';
import { ITHPlatformState, THPlatform } from './THPlatform';
import { GPPlatform, IBeiJingPlatformState } from './GPPlatform';
import { GPPlatform, IGPPlatformState } from './GPPlatform';
import { StyleType } from 'common/common';
export class PlatformTemplate extends JlGraphicTemplate<JlPlatform> {
@ -11,7 +11,7 @@ export class PlatformTemplate extends JlGraphicTemplate<JlPlatform> {
styleType: StyleType;
constructor(
dataTemplate: IPlatformData,
stateTemplate: ITHPlatformState | IBeiJingPlatformState,
stateTemplate: ITHPlatformState | IGPPlatformState,
styleType: StyleType,
) {
super(JlPlatform.Type, { dataTemplate, stateTemplate });