测试
This commit is contained in:
parent
0619184b9b
commit
b5d778ea24
4
components/packages/Turnout/GPTurnout.d.ts
vendored
4
components/packages/Turnout/GPTurnout.d.ts
vendored
@ -1,5 +1,5 @@
|
|||||||
import { JlTurnout } from './common/JlTurnout';
|
import { JlTurnout } from './common/JlTurnout';
|
||||||
export declare class Turnout extends JlTurnout {
|
export declare class GPTurnout extends JlTurnout {
|
||||||
static Type: string;
|
constructor();
|
||||||
doRepaint(): void;
|
doRepaint(): void;
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
import { JlTurnout } from './common/JlTurnout.js';
|
import { JlTurnout } from './common/JlTurnout.js';
|
||||||
|
import { GPConsts } from './common/TurnoutConfig.js';
|
||||||
|
|
||||||
class Turnout extends JlTurnout {
|
class GPTurnout extends JlTurnout {
|
||||||
static Type = 'Turnout';
|
constructor() {
|
||||||
|
super(GPConsts);
|
||||||
|
}
|
||||||
doRepaint() {
|
doRepaint() {
|
||||||
super.draw();
|
super.draw();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export { Turnout };
|
export { GPTurnout };
|
||||||
|
33
components/packages/Turnout/Turnout.d.ts
vendored
33
components/packages/Turnout/Turnout.d.ts
vendored
@ -1,33 +0,0 @@
|
|||||||
import { DevicePort, IRelatedRef, KilometerSystem } from 'common/common';
|
|
||||||
import { GraphicData, JlGraphic } from 'jl-graphic';
|
|
||||||
import { IPointData } from 'pixi.js';
|
|
||||||
export declare enum SwitchMachineType {
|
|
||||||
Unknown = 0,
|
|
||||||
ZDJ9_Single = 1,
|
|
||||||
ZDJ9_Double = 2
|
|
||||||
}
|
|
||||||
export interface ITurnoutData extends GraphicData {
|
|
||||||
code: string;
|
|
||||||
pointA: IPointData[];
|
|
||||||
pointB: IPointData[];
|
|
||||||
pointC: IPointData[];
|
|
||||||
paRef?: IRelatedRef;
|
|
||||||
pbRef?: IRelatedRef;
|
|
||||||
pcRef?: IRelatedRef;
|
|
||||||
kilometerSystem: KilometerSystem;
|
|
||||||
paTrackSectionId?: number;
|
|
||||||
pbTrackSectionId?: number;
|
|
||||||
pcTrackSectionId?: number;
|
|
||||||
switchMachineType?: SwitchMachineType;
|
|
||||||
centralizedStations?: number[];
|
|
||||||
clone(): ITurnoutData;
|
|
||||||
copyFrom(data: ITurnoutData): void;
|
|
||||||
eq(other: ITurnoutData): boolean;
|
|
||||||
}
|
|
||||||
export declare class Turnout extends JlGraphic {
|
|
||||||
static Type: string;
|
|
||||||
doRepaint(): void;
|
|
||||||
get datas(): ITurnoutData;
|
|
||||||
getGraphicOfPort(port: DevicePort): JlGraphic[];
|
|
||||||
getPortPoints(): IPointData[][];
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
import { JlGraphic } from 'jl-graphic';
|
|
||||||
|
|
||||||
var SwitchMachineType;
|
|
||||||
(function (SwitchMachineType) {
|
|
||||||
SwitchMachineType[SwitchMachineType["Unknown"] = 0] = "Unknown";
|
|
||||||
SwitchMachineType[SwitchMachineType["ZDJ9_Single"] = 1] = "ZDJ9_Single";
|
|
||||||
SwitchMachineType[SwitchMachineType["ZDJ9_Double"] = 2] = "ZDJ9_Double";
|
|
||||||
})(SwitchMachineType || (SwitchMachineType = {}));
|
|
||||||
class Turnout extends JlGraphic {
|
|
||||||
static Type = 'Turnout';
|
|
||||||
doRepaint() {
|
|
||||||
console.log(111);
|
|
||||||
}
|
|
||||||
get datas() {
|
|
||||||
return this.getDatas();
|
|
||||||
}
|
|
||||||
getGraphicOfPort(port) {
|
|
||||||
return this.relationManage
|
|
||||||
.getRelationsOfGraphic(this)
|
|
||||||
.filter((relation) => relation.getRelationParam(this).getParam() === port)
|
|
||||||
.map((relation) => {
|
|
||||||
return relation.getOtherGraphic(this);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
getPortPoints() {
|
|
||||||
return [this.datas.pointA, this.datas.pointB, this.datas.pointC];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export { SwitchMachineType, Turnout };
|
|
@ -1,7 +1,10 @@
|
|||||||
import { JlTurnout } from './common/JlTurnout';
|
import { JlTurnout } from './common/JlTurnout';
|
||||||
|
import { GPConsts } from './common/TurnoutConfig';
|
||||||
|
|
||||||
export class Turnout extends JlTurnout {
|
export class GPTurnout extends JlTurnout {
|
||||||
static Type = 'Turnout';
|
constructor() {
|
||||||
|
super(GPConsts);
|
||||||
|
}
|
||||||
doRepaint(): void {
|
doRepaint(): void {
|
||||||
super.draw();
|
super.draw();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user