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 { GraphicState } from 'jl-graphic';
import { JlPlatform } from './JlPlatform'; import { JlPlatform } from './JlPlatform';
export interface IBeiJingPlatformState extends GraphicState { export interface IGPPlatformState extends GraphicState {
id?: number; id?: number;
} }
export declare class GPPlatform extends JlPlatform { export declare class GPPlatform extends JlPlatform {
constructor(); constructor();
get states(): IBeiJingPlatformState; get states(): IGPPlatformState;
doRepaint(): void; doRepaint(): void;
} }

View File

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

View File

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

View File

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