From 09437d5fa08d292df970587f69fcc59d5029be72 Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Wed, 3 Jan 2024 16:43:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/Separator/Separator.js | 8 ++- components/Separator/SeparatorConfig.js | 2 +- .../Separator/SeparatorDrawAssistant.js | 4 +- components/Train/Train.js | 8 ++- components/Train/TrainConfig.js | 6 +- components/Transponder/Transponder.js | 8 ++- .../Transponder/TransponderDrawAssistant.js | 4 +- components/packages/Separator/Separator.d.ts | 23 ++++++ .../packages/Separator/SeparatorConfig.d.ts | 25 +++++++ .../Separator/SeparatorDrawAssistant.d.ts | 25 +++++++ components/packages/Train/Train.d.ts | 71 +++++++++++++++++++ components/packages/Train/TrainConfig.d.ts | 64 +++++++++++++++++ .../packages/Transponder/Transponder.d.ts | 25 +++++++ .../Transponder/TransponderConfig.d.ts | 43 +++++++++++ .../Transponder/TransponderDrawAssistant.d.ts | 22 ++++++ src/packages/Separator/Separator.ts | 8 ++- src/packages/Separator/SeparatorConfig.ts | 2 +- .../Separator/SeparatorDrawAssistant.ts | 4 +- src/packages/Train/Train.ts | 8 ++- src/packages/Train/TrainConfig.ts | 6 +- src/packages/Transponder/Transponder.ts | 8 ++- .../Transponder/TransponderDrawAssistant.ts | 4 +- 22 files changed, 344 insertions(+), 34 deletions(-) create mode 100644 components/packages/Separator/Separator.d.ts create mode 100644 components/packages/Separator/SeparatorConfig.d.ts create mode 100644 components/packages/Separator/SeparatorDrawAssistant.d.ts create mode 100644 components/packages/Train/Train.d.ts create mode 100644 components/packages/Train/TrainConfig.d.ts create mode 100644 components/packages/Transponder/Transponder.d.ts create mode 100644 components/packages/Transponder/TransponderConfig.d.ts create mode 100644 components/packages/Transponder/TransponderDrawAssistant.d.ts diff --git a/components/Separator/Separator.js b/components/Separator/Separator.js index 46731d1..fe07b36 100644 --- a/components/Separator/Separator.js +++ b/components/Separator/Separator.js @@ -62,13 +62,15 @@ class Separator extends JlGraphic { } } class SeparatorTemplate extends JlGraphicTemplate { - constructor(dataTemplate) { + updataConsts; + constructor(dataTemplate, data) { super(Separator.Type, { dataTemplate, }); + this.updataConsts = data; } - new(data) { - const separator = new Separator(data); + new() { + const separator = new Separator(this.updataConsts); separator.loadData(this.datas); return separator; } diff --git a/components/Separator/SeparatorConfig.js b/components/Separator/SeparatorConfig.js index 69afedc..dcec7fd 100644 --- a/components/Separator/SeparatorConfig.js +++ b/components/Separator/SeparatorConfig.js @@ -9,7 +9,7 @@ function getSeparatorConsts() { const separatorConsts = { height: 12, lineWidth: 2, - lineColor: '0x617799', + lineColor: '0xFFFFFF', circleColor: '0xEF0200', radius: 5, }; diff --git a/components/Separator/SeparatorDrawAssistant.js b/components/Separator/SeparatorDrawAssistant.js index 3a69bc5..0e18560 100644 --- a/components/Separator/SeparatorDrawAssistant.js +++ b/components/Separator/SeparatorDrawAssistant.js @@ -4,9 +4,9 @@ import { Separator } from './Separator.js'; class SeparatorDraw extends GraphicDrawAssistant { SeparatorGraph; - constructor(app, template, data) { + constructor(app, template) { super(app, template, 'sym_o_square', '分隔符Separator'); - this.SeparatorGraph = this.graphicTemplate.new(data); + this.SeparatorGraph = this.graphicTemplate.new(); this.container.addChild(this.SeparatorGraph); SeparatorInteraction.init(app); } diff --git a/components/Train/Train.js b/components/Train/Train.js index 301fe8b..7e52f06 100644 --- a/components/Train/Train.js +++ b/components/Train/Train.js @@ -310,11 +310,13 @@ class Train extends JlGraphic { } } class TrainTemplate extends JlGraphicTemplate { - constructor(stateTemplate) { + updataConsts; + constructor(stateTemplate, data) { super(Train.Type, { stateTemplate }); + this.updataConsts = data; } - new(data) { - const train = new Train(data); + new() { + const train = new Train(this.updataConsts); train.id = GraphicIdGenerator.next(); train.loadState(this.states); return train; diff --git a/components/Train/TrainConfig.js b/components/Train/TrainConfig.js index 24a13f3..29a2eca 100644 --- a/components/Train/TrainConfig.js +++ b/components/Train/TrainConfig.js @@ -32,12 +32,12 @@ function getTrainConsts() { borderWidth: 1, codeFontSize: 22, textFontSize: 16, // 状态字母大小 - textMarginY: 10, // 状态字母与列车距离 + textMarginY: 5, // 状态字母与列车距离 statusTextList: [EnumStatusText.H, EnumStatusText.S, EnumStatusText.D, EnumStatusText.A], - marginX: 4, // 图形x轴边距 + marginX: 2, // 图形x轴边距 pauseW: 4, // 停止框宽度 codeColor: '0xffffff', // 车号颜色 - borderColor: '0xA3E198', // 边框的颜色 + borderColor: '0xffffff', // 边框的颜色 bodyBgColor: '0x737373', // body背景色 arrowDefaultColor: '0x00FF00', // 箭头默认颜色 pauseDefaultColor: '0x00FF00', // 停止默认颜色 diff --git a/components/Transponder/Transponder.js b/components/Transponder/Transponder.js index 3c70b93..79e387a 100644 --- a/components/Transponder/Transponder.js +++ b/components/Transponder/Transponder.js @@ -85,13 +85,15 @@ class Transponder extends JlGraphic { } } class TransponderTemplate extends JlGraphicTemplate { - constructor(dataTemplate) { + updataConsts; + constructor(dataTemplate, data) { super(Transponder.Type, { dataTemplate, }); + this.updataConsts = data; } - new(data) { - const transponder = new Transponder(data); + new() { + const transponder = new Transponder(this.updataConsts); transponder.loadData(this.datas); return transponder; } diff --git a/components/Transponder/TransponderDrawAssistant.js b/components/Transponder/TransponderDrawAssistant.js index a75b4e5..ee115a7 100644 --- a/components/Transponder/TransponderDrawAssistant.js +++ b/components/Transponder/TransponderDrawAssistant.js @@ -4,9 +4,9 @@ import { Transponder } from './Transponder.js'; class TransponderDraw extends GraphicDrawAssistant { TransponderGraph; - constructor(app, template, data) { + constructor(app, template) { super(app, template, 'border_all', '应答器Transponder'); - this.TransponderGraph = this.graphicTemplate.new(data); + this.TransponderGraph = this.graphicTemplate.new(); this.container.addChild(this.TransponderGraph); TransponderInteraction.init(app); } diff --git a/components/packages/Separator/Separator.d.ts b/components/packages/Separator/Separator.d.ts new file mode 100644 index 0000000..0480534 --- /dev/null +++ b/components/packages/Separator/Separator.d.ts @@ -0,0 +1,23 @@ +import { Graphics } from 'pixi.js'; +import { JlGraphic, JlGraphicTemplate } from 'jl-graphic'; +import { ISeparatorConsts, ISeparatorData, UpdateSeparatorConsts } from './SeparatorConfig'; +/** + * 分隔符 + * @param {UpdateSeparatorConsts}常量数据 + * + */ +export declare class Separator extends JlGraphic { + static Type: string; + rectGraphic: Graphics; + circleGraphic: Graphics; + constDatas: ISeparatorConsts; + constructor(data?: UpdateSeparatorConsts); + get datas(): ISeparatorData; + clear(): void; + doRepaint(): void; +} +export declare class SeparatorTemplate extends JlGraphicTemplate { + updataConsts: UpdateSeparatorConsts | undefined; + constructor(dataTemplate: ISeparatorData, data?: UpdateSeparatorConsts); + new(): Separator; +} diff --git a/components/packages/Separator/SeparatorConfig.d.ts b/components/packages/Separator/SeparatorConfig.d.ts new file mode 100644 index 0000000..4de62da --- /dev/null +++ b/components/packages/Separator/SeparatorConfig.d.ts @@ -0,0 +1,25 @@ +import { GraphicData } from "jl-graphic"; +export declare enum separatorTypeEnum { + turnout = "turnout",// 道岔分隔符 + endA = "endA",// A端尽头分隔符 + endB = "endB",// B端尽头分隔符 + section = "section" +} +export interface ISeparatorConsts { + height: number; + lineWidth: number; + lineColor: string; + circleColor: string; + radius: number; +} +export type UpdateSeparatorConsts = Partial; +export interface ISeparatorData extends GraphicData { + get code(): string; + set code(v: string); + get separatorType(): string; + set separatorType(v: string); + clone(): ISeparatorData; + copyFrom(data: ISeparatorData): void; + eq(other: ISeparatorData): boolean; +} +export declare function getSeparatorConsts(): ISeparatorConsts; diff --git a/components/packages/Separator/SeparatorDrawAssistant.d.ts b/components/packages/Separator/SeparatorDrawAssistant.d.ts new file mode 100644 index 0000000..4cbceef --- /dev/null +++ b/components/packages/Separator/SeparatorDrawAssistant.d.ts @@ -0,0 +1,25 @@ +import { FederatedPointerEvent, IHitArea, Point } from 'pixi.js'; +import { GraphicDrawAssistant, GraphicInteractionPlugin, IDrawApp, JlGraphic } from 'jl-graphic'; +import { Separator, SeparatorTemplate } from './Separator'; +import { ISeparatorData } from './SeparatorConfig'; +export declare class SeparatorDraw extends GraphicDrawAssistant { + SeparatorGraph: Separator; + constructor(app: IDrawApp, template: SeparatorTemplate); + bind(): void; + onLeftDown(e: FederatedPointerEvent): void; + redraw(p: Point): void; + prepareData(data: ISeparatorData): boolean; +} +export declare class SeparatorGraphicHitArea implements IHitArea { + separator: Separator; + constructor(separator: Separator); + contains(x: number, y: number): boolean; +} +export declare class SeparatorInteraction extends GraphicInteractionPlugin { + static Name: string; + constructor(app: IDrawApp); + static init(app: IDrawApp): SeparatorInteraction; + filter(...grahpics: JlGraphic[]): Separator[] | undefined; + bind(g: Separator): void; + unbind(g: Separator): void; +} diff --git a/components/packages/Train/Train.d.ts b/components/packages/Train/Train.d.ts new file mode 100644 index 0000000..aefe210 --- /dev/null +++ b/components/packages/Train/Train.d.ts @@ -0,0 +1,71 @@ +import { Graphics, Container } from 'pixi.js'; +import { JlGraphic, JlGraphicTemplate, VectorText } from 'jl-graphic'; +import { ITrainConstsConfig, EnumDiriveModel, EnumStatusText, UpdateTrainConsts, EnumTrainType, ITrainData } from './TrainConfig'; +interface bodyWH { + width: number; + height: number; +} +declare class TrainHead extends Container { + arrow: Graphics; + pause: Graphics; + train: Train; + isStop: boolean; + arrowColor: string; + pauseColor: string; + constructor(train: Train); + clear(): void; + doRepaint(): void; + isRight(): boolean; +} +declare class TrainBody extends Container { + bodyRact: Graphics; + codeAGraph: VectorText; + codeBGraph: VectorText; + train: Train; + codeAColor: string; + codeBColor: string; + codeAText: string; + codeBText: string; + constructor(train: Train); + clear(): void; + getBodyWH(): bodyWH; + doRepaint(): void; +} +declare class StatusText extends Container { + sText: VectorText; + train: Train; + constructor(train: Train); + doRepaint(text: EnumStatusText, bodyWH: bodyWH): void; + clear(): void; +} +/** + * 列车 + */ +export declare class Train extends JlGraphic { + static Type: string; + trainHead: TrainHead; + trainbody: TrainBody; + statusTextMap: Map; + isRightRoTop: boolean; + constDatas: ITrainConstsConfig; + constructor(data?: UpdateTrainConsts); + get datas(): ITrainData; + doRepaint(): void; + setIsStop(v: boolean): void; + setArrowVisible(v: boolean): void; + setPauseVisible(v: boolean): void; + run(): void; + stop(): void; + setCodeAText(v: string): void; + setCodeBText(v: string): void; + setDiriveModelColor(s: EnumDiriveModel): void; + setTrainTypeColor(s: EnumTrainType): void; + showStatus(s: EnumStatusText): void; + hideStatus(s: EnumStatusText): void; +} +export declare class TrainTemplate extends JlGraphicTemplate { + updataConsts: UpdateTrainConsts | undefined; + constructor(stateTemplate: any, data?: UpdateTrainConsts); + new(): Train; +} +export {}; diff --git a/components/packages/Train/TrainConfig.d.ts b/components/packages/Train/TrainConfig.d.ts new file mode 100644 index 0000000..f732a86 --- /dev/null +++ b/components/packages/Train/TrainConfig.d.ts @@ -0,0 +1,64 @@ +import { GraphicData } from "jl-graphic"; +export interface ITrainConstsConfig { + bodyWidth: number; + bodyHeight: number; + bodyPadding: number; + borderWidth: number; + codeFontSize: number; + textFontSize: number; + textMarginY: number; + statusTextList: EnumStatusText[]; + marginX: number; + pauseW: number; + bodyBgColor?: string; + codeColor: string; + borderColor: string; + arrowDefaultColor: string; + pauseDefaultColor: string; + DiriveModelColorEnum: DiriveModelColor; + typeColorEnum: TypeColor; + statusTextColor: IStatusTextColor; + statusTextTransform?: IStatusTextColor; + arrowPauseOnlyOne: boolean; + hasBodyRact: boolean; +} +export type UpdateTrainConsts = Partial; +export declare enum EnumDiriveModel { + AM = "AM",// ATO自动驾驶 + SM = "SM",// ATP 监控下的人工驾驶模式 + RM = "RM",// 限制人工驾驶模式 + NRM = "NRM",// 非限制人工驾驶模式 + red = "red" +} +export type DiriveModelColor = { + [key in EnumDiriveModel]: string; +}; +export declare enum EnumTrainType { + accuracy = "accuracy",// 准点 + early = "early",// 早点 + late = "late",// 晚点 + schedule = "schedule",// 计划车 + head = "head",// 头码车 + manual = "manual",// 人工车 + special = "special" +} +export type TypeColor = { + [key in EnumTrainType]: string; +}; +export declare enum EnumStatusText { + H = "H",// H扣车 + S = "S",// S跳停 + D = "D",// D开门 + A = "A" +} +export type IStatusTextColor = { + [key in EnumStatusText]: string; +}; +export interface ITrainData extends GraphicData { + get code(): string; + set code(v: string); + clone(): ITrainData; + copyFrom(data: ITrainData): void; + eq(other: ITrainData): boolean; +} +export declare function getTrainConsts(): ITrainConstsConfig; diff --git a/components/packages/Transponder/Transponder.d.ts b/components/packages/Transponder/Transponder.d.ts new file mode 100644 index 0000000..8438f69 --- /dev/null +++ b/components/packages/Transponder/Transponder.d.ts @@ -0,0 +1,25 @@ +import { Container, Graphics } from 'pixi.js'; +import { JlGraphic, JlGraphicTemplate, VectorText } from 'jl-graphic'; +import { ITransponderData, ITransponderConsts, UpdateTransponderConsts } from './TransponderConfig'; +export declare class TransponderCode extends Container { + codeText: VectorText; + name: string; + constructor(); + clear(): void; + paint(datas: ITransponderData): void; +} +export declare class Transponder extends JlGraphic { + static Type: string; + polygonGraphic: Graphics; + labelGraphic: TransponderCode; + constDatas: ITransponderConsts; + constructor(data?: UpdateTransponderConsts); + get datas(): ITransponderData; + clear(): void; + doRepaint(): void; +} +export declare class TransponderTemplate extends JlGraphicTemplate { + updataConsts: UpdateTransponderConsts | undefined; + constructor(dataTemplate: ITransponderData, data?: UpdateTransponderConsts); + new(): Transponder; +} diff --git a/components/packages/Transponder/TransponderConfig.d.ts b/components/packages/Transponder/TransponderConfig.d.ts new file mode 100644 index 0000000..03e7d4f --- /dev/null +++ b/components/packages/Transponder/TransponderConfig.d.ts @@ -0,0 +1,43 @@ +import { GraphicData } from 'jl-graphic'; +export interface ITransponderData extends GraphicData { + get code(): string; + set code(v: string); + get centralizedStations(): number[]; + set centralizedStations(v: number[]); + get fixedTelegram(): Uint8Array; + set fixedTelegram(v: Uint8Array); + get type(): TransponderTypeEnum; + set type(v: TransponderTypeEnum); + clone(): ITransponderData; + copyFrom(data: ITransponderData): void; + eq(other: ITransponderData): boolean; +} +export declare enum TransponderTypeEnum { + FB = 0,// 固定应答器 + WB = 1,// 轮径校正应答器 + DB = 2,// 休眠唤醒应答器 + VB = 3,// 主信号应答器 + IB = 4 +} +export interface ITransponderConsts { + height: number; + lineWidth: number; + lineColor: string; + wblineColor: string; + textFontSize: number; + textMarginY: number; + vblineColor: string; + iblineColor: string; +} +export declare function getTypePoints(type: TransponderTypeEnum, TrConsts: ITransponderConsts): number[][]; +export type UpdateTransponderConsts = Partial; +export declare function getTransponderConsts(): { + height: number; + lineWidth: number; + lineColor: string; + wblineColor: string; + textFontSize: number; + textMarginY: number; + vblineColor: string; + iblineColor: string; +}; diff --git a/components/packages/Transponder/TransponderDrawAssistant.d.ts b/components/packages/Transponder/TransponderDrawAssistant.d.ts new file mode 100644 index 0000000..7df6492 --- /dev/null +++ b/components/packages/Transponder/TransponderDrawAssistant.d.ts @@ -0,0 +1,22 @@ +import { FederatedPointerEvent, Point } from 'pixi.js'; +import { GraphicDrawAssistant, GraphicInteractionPlugin, GraphicTransformEvent, IDrawApp, JlGraphic } from 'jl-graphic'; +import { Transponder, TransponderTemplate } from './Transponder'; +import { ITransponderData } from './TransponderConfig'; +export declare class TransponderDraw extends GraphicDrawAssistant { + TransponderGraph: Transponder; + constructor(app: IDrawApp, template: TransponderTemplate); + bind(): void; + onLeftDown(e: FederatedPointerEvent): void; + redraw(p: Point): void; + prepareData(data: ITransponderData): boolean; +} +export declare class TransponderInteraction extends GraphicInteractionPlugin { + static Name: string; + constructor(app: IDrawApp); + static init(app: IDrawApp): TransponderInteraction; + filter(...grahpics: JlGraphic[]): Transponder[] | undefined; + bind(g: Transponder): void; + unbind(g: Transponder): void; + transformstart(e: GraphicTransformEvent): void; + codetransformstart(e: GraphicTransformEvent): void; +} diff --git a/src/packages/Separator/Separator.ts b/src/packages/Separator/Separator.ts index b46702d..a49e20b 100644 --- a/src/packages/Separator/Separator.ts +++ b/src/packages/Separator/Separator.ts @@ -76,13 +76,15 @@ export class Separator extends JlGraphic { } export class SeparatorTemplate extends JlGraphicTemplate { - constructor(dataTemplate: ISeparatorData) { + updataConsts: UpdateSeparatorConsts | undefined; + constructor(dataTemplate: ISeparatorData, data?: UpdateSeparatorConsts) { super(Separator.Type, { dataTemplate, }); + this.updataConsts = data } - new(data?: UpdateSeparatorConsts): Separator { - const separator = new Separator(data); + new(): Separator { + const separator = new Separator(this.updataConsts); separator.loadData(this.datas); return separator; } diff --git a/src/packages/Separator/SeparatorConfig.ts b/src/packages/Separator/SeparatorConfig.ts index 92c9d02..1f30aee 100644 --- a/src/packages/Separator/SeparatorConfig.ts +++ b/src/packages/Separator/SeparatorConfig.ts @@ -31,7 +31,7 @@ export function getSeparatorConsts(): ISeparatorConsts { const separatorConsts = { height: 12, lineWidth: 2, - lineColor: '0x617799', + lineColor: '0xFFFFFF', circleColor: '0xEF0200', radius: 5, }; diff --git a/src/packages/Separator/SeparatorDrawAssistant.ts b/src/packages/Separator/SeparatorDrawAssistant.ts index b3efb69..15f03b1 100644 --- a/src/packages/Separator/SeparatorDrawAssistant.ts +++ b/src/packages/Separator/SeparatorDrawAssistant.ts @@ -16,9 +16,9 @@ export class SeparatorDraw extends GraphicDrawAssistant< ISeparatorData > { SeparatorGraph: Separator; - constructor(app: IDrawApp, template: SeparatorTemplate, data?: UpdateSeparatorConsts) { + constructor(app: IDrawApp, template: SeparatorTemplate) { super(app, template, 'sym_o_square', '分隔符Separator'); - this.SeparatorGraph = this.graphicTemplate.new(data); + this.SeparatorGraph = this.graphicTemplate.new(); this.container.addChild(this.SeparatorGraph); SeparatorInteraction.init(app); } diff --git a/src/packages/Train/Train.ts b/src/packages/Train/Train.ts index 072cc49..8393e0b 100644 --- a/src/packages/Train/Train.ts +++ b/src/packages/Train/Train.ts @@ -347,11 +347,13 @@ export class Train extends JlGraphic { export class TrainTemplate extends JlGraphicTemplate { - constructor(stateTemplate: any) { + updataConsts: UpdateTrainConsts | undefined; + constructor(stateTemplate: any, data?: UpdateTrainConsts) { super(Train.Type, { stateTemplate }); + this.updataConsts = data } - new(data?: UpdateTrainConsts): Train { - const train = new Train(data); + new(): Train { + const train = new Train(this.updataConsts); train.id = GraphicIdGenerator.next(); train.loadState(this.states); return train; diff --git a/src/packages/Train/TrainConfig.ts b/src/packages/Train/TrainConfig.ts index 1a06c5d..d9dfda8 100644 --- a/src/packages/Train/TrainConfig.ts +++ b/src/packages/Train/TrainConfig.ts @@ -78,12 +78,12 @@ export function getTrainConsts(): ITrainConstsConfig { borderWidth: 1, codeFontSize: 22, textFontSize: 16, // 状态字母大小 - textMarginY: 10, // 状态字母与列车距离 + textMarginY: 5, // 状态字母与列车距离 statusTextList: [EnumStatusText.H, EnumStatusText.S, EnumStatusText.D, EnumStatusText.A], - marginX: 4, // 图形x轴边距 + marginX: 2, // 图形x轴边距 pauseW: 4, // 停止框宽度 codeColor: '0xffffff', // 车号颜色 - borderColor: '0xA3E198', // 边框的颜色 + borderColor: '0xffffff', // 边框的颜色 bodyBgColor: '0x737373', // body背景色 arrowDefaultColor: '0x00FF00', // 箭头默认颜色 pauseDefaultColor: '0x00FF00', // 停止默认颜色 diff --git a/src/packages/Transponder/Transponder.ts b/src/packages/Transponder/Transponder.ts index 9ca1f3a..c4b34aa 100644 --- a/src/packages/Transponder/Transponder.ts +++ b/src/packages/Transponder/Transponder.ts @@ -96,13 +96,15 @@ export class Transponder extends JlGraphic { } export class TransponderTemplate extends JlGraphicTemplate { - constructor(dataTemplate: ITransponderData) { + updataConsts: UpdateTransponderConsts | undefined; + constructor(dataTemplate: ITransponderData, data?: UpdateTransponderConsts) { super(Transponder.Type, { dataTemplate, }); + this.updataConsts = data } - new(data?: UpdateTransponderConsts): Transponder { - const transponder = new Transponder(data); + new(): Transponder { + const transponder = new Transponder(this.updataConsts); transponder.loadData(this.datas); return transponder; } diff --git a/src/packages/Transponder/TransponderDrawAssistant.ts b/src/packages/Transponder/TransponderDrawAssistant.ts index 4fb941e..ff0eb68 100644 --- a/src/packages/Transponder/TransponderDrawAssistant.ts +++ b/src/packages/Transponder/TransponderDrawAssistant.ts @@ -19,9 +19,9 @@ export class TransponderDraw extends GraphicDrawAssistant< ITransponderData > { TransponderGraph: Transponder; - constructor(app: IDrawApp, template: TransponderTemplate, data?: UpdateTransponderConsts) { + constructor(app: IDrawApp, template: TransponderTemplate) { super(app, template, 'border_all', '应答器Transponder'); - this.TransponderGraph = this.graphicTemplate.new(data); + this.TransponderGraph = this.graphicTemplate.new(); this.container.addChild(this.TransponderGraph); TransponderInteraction.init(app); }