diff --git a/src/graphics/axleCounting/AxleCountingDrawAssistant.ts b/src/graphics/axleCounting/AxleCountingDrawAssistant.ts index b7b38b7..d2f96bd 100644 --- a/src/graphics/axleCounting/AxleCountingDrawAssistant.ts +++ b/src/graphics/axleCounting/AxleCountingDrawAssistant.ts @@ -5,7 +5,7 @@ import { GraphicDrawAssistant, GraphicIdGenerator, GraphicInteractionPlugin, - JlDrawApp, + IDrawApp, JlGraphic, distance2, } from 'src/jl-graphic'; @@ -16,7 +16,7 @@ import { AxleCountingTemplate, AxleCountingConsts, } from './AxleCounting'; -import { Section, SectionPort, SectionType } from '../section/Section'; +import { Section, SectionPort } from '../section/Section'; import { Turnout, TurnoutPort } from '../turnout/Turnout'; import { IRelatedRefData, createRelatedRefProto } from '../CommonGraphics'; import { Signal } from '../signal/Signal'; @@ -42,7 +42,7 @@ export class AxleCountingDraw extends GraphicDrawAssistant< IAxleCountingData > { codeGraph: AxleCounting; - constructor(app: JlDrawApp, template: AxleCountingTemplate) { + constructor(app: IDrawApp, template: AxleCountingTemplate) { super(app, template, 'sym_o_circle', '不展示'); this.codeGraph = this.graphicTemplate.new(); this.container.addChild(this.codeGraph); @@ -198,12 +198,6 @@ export class AxleCountingDraw extends GraphicDrawAssistant< if (axleCountingPs.y > height.y) { direction = -1; } - if ( - section.datas.sectionType === SectionType.Logic || - section.datas.children.includes(refDevice.id) - ) { - return; - } if (refDevice.type == Section.Type || refDevice.type == Turnout.Type) this.draw( axleCountingPs, @@ -352,10 +346,10 @@ function buildAbsorbablePositions( export class AxleCountingInteraction extends GraphicInteractionPlugin { static Name = 'AxleCounting_transform'; - constructor(app: JlDrawApp) { + constructor(app: IDrawApp) { super(AxleCountingInteraction.Name, app); } - static init(app: JlDrawApp) { + static init(app: IDrawApp) { return new AxleCountingInteraction(app); } filter(...grahpics: JlGraphic[]): AxleCounting[] | undefined { diff --git a/src/graphics/link/LinkDrawAssistant.ts b/src/graphics/link/LinkDrawAssistant.ts index 353af5f..8b833ad 100644 --- a/src/graphics/link/LinkDrawAssistant.ts +++ b/src/graphics/link/LinkDrawAssistant.ts @@ -10,11 +10,11 @@ import { import { AbsorbablePosition, DraggablePoint, - GraphicApp, + IGraphicApp, GraphicDrawAssistant, GraphicInteractionPlugin, GraphicTransformEvent, - JlDrawApp, + IDrawApp, JlGraphic, KeyListener, calculateMirrorPoint, @@ -61,7 +61,7 @@ export class LinkDraw extends GraphicDrawAssistant { }, }); - constructor(app: JlDrawApp) { + constructor(app: IDrawApp) { super(app, new LinkTemplate(), 'sym_o_horizontal_rule', '轨道Link'); this.container.addChild(this.graphic); this.graphicTemplate.curve = true; @@ -268,10 +268,10 @@ function onEditPointCreate( */ export class LinkPointsEditPlugin extends GraphicInteractionPlugin { static Name = 'LinkPointsDrag'; - constructor(app: GraphicApp) { + constructor(app: IGraphicApp) { super(LinkPointsEditPlugin.Name, app); } - static init(app: GraphicApp): LinkPointsEditPlugin { + static init(app: IGraphicApp): LinkPointsEditPlugin { return new LinkPointsEditPlugin(app); } filter(...grahpics: JlGraphic[]): Link[] | undefined { diff --git a/src/graphics/logicSection/LogicSectionDrawAssistant.ts b/src/graphics/logicSection/LogicSectionDrawAssistant.ts index d0ce5e0..2a6da02 100644 --- a/src/graphics/logicSection/LogicSectionDrawAssistant.ts +++ b/src/graphics/logicSection/LogicSectionDrawAssistant.ts @@ -1,8 +1,8 @@ import { - GraphicApp, + IGraphicApp, GraphicDrawAssistant, GraphicInteractionPlugin, - JlDrawApp, + IDrawApp, JlGraphic, linePoint, } from 'src/jl-graphic'; @@ -17,7 +17,7 @@ export class LogicSectionDraw extends GraphicDrawAssistant< > { points: Point[] = []; graphic = new Graphics(); - constructor(app: JlDrawApp, template: LogicSectionTemplate) { + constructor(app: IDrawApp, template: LogicSectionTemplate) { super(app, template, 'sym_o_timeline', '不展示'); this.container.addChild(this.graphic); LogicSectionEditPlugin.init(app); @@ -60,10 +60,10 @@ export class LogicSectionGraphicHitArea implements IHitArea { export class LogicSectionEditPlugin extends GraphicInteractionPlugin { static Name = 'LogicSectionInteraction'; - constructor(app: GraphicApp) { + constructor(app: IGraphicApp) { super(LogicSectionEditPlugin.Name, app); } - static init(app: GraphicApp) { + static init(app: IGraphicApp) { return new LogicSectionEditPlugin(app); } filter(...grahpics: JlGraphic[]): LogicSection[] | undefined { diff --git a/src/graphics/pathLine/PathLineDrawAssistant.ts b/src/graphics/pathLine/PathLineDrawAssistant.ts index f1e000d..f441808 100644 --- a/src/graphics/pathLine/PathLineDrawAssistant.ts +++ b/src/graphics/pathLine/PathLineDrawAssistant.ts @@ -1,9 +1,9 @@ import { GraphicDrawAssistant, - JlDrawApp, + IDrawApp, linePoint, GraphicInteractionPlugin, - GraphicApp, + IGraphicApp, JlGraphic, DraggablePoint, GraphicTransformEvent, @@ -37,7 +37,7 @@ export class PathLineDraw extends GraphicDrawAssistant< code = ''; graphic: Graphics = new Graphics(); - constructor(app: JlDrawApp, template: PathLineTemplate) { + constructor(app: IDrawApp, template: PathLineTemplate) { super(app, template, 'sym_o_horizontal_rule', '不展示'); this.container.addChild(this.graphic); PathLinePointsEditPlugin.init(app); @@ -106,10 +106,10 @@ export class PathLineGraphicHitArea implements IHitArea { export class PathLinePointsEditPlugin extends GraphicInteractionPlugin { static Name = 'LinkPointsDrag'; - constructor(app: GraphicApp) { + constructor(app: IGraphicApp) { super(PathLinePointsEditPlugin.Name, app); } - static init(app: GraphicApp): PathLinePointsEditPlugin { + static init(app: IGraphicApp): PathLinePointsEditPlugin { return new PathLinePointsEditPlugin(app); } filter(...grahpics: JlGraphic[]): PathLine[] | undefined { diff --git a/src/graphics/platform/Platform.ts b/src/graphics/platform/Platform.ts index c269244..89c03bb 100644 --- a/src/graphics/platform/Platform.ts +++ b/src/graphics/platform/Platform.ts @@ -372,7 +372,7 @@ export class Platform extends JlGraphic { return this.datas.code; } doRepaint(): void { - const station = this.queryStore.queryByCodeAndType( + const station = this.getGraphicApp().queryStore.queryByCodeAndType( this.states.rtuId > 9 ? '' + this.states.rtuId : '0' + this.states.rtuId, Station.Type ); diff --git a/src/graphics/platform/PlatformDrawAssistant.ts b/src/graphics/platform/PlatformDrawAssistant.ts index ad977a0..4530997 100644 --- a/src/graphics/platform/PlatformDrawAssistant.ts +++ b/src/graphics/platform/PlatformDrawAssistant.ts @@ -4,7 +4,7 @@ import { AbsorbablePosition, GraphicDrawAssistant, GraphicInteractionPlugin, - JlDrawApp, + IDrawApp, JlGraphic, } from 'src/jl-graphic'; @@ -19,7 +19,7 @@ export class PlatformDraw extends GraphicDrawAssistant< IPlatformData > { platformGraphic: Platform; - constructor(app: JlDrawApp, template: PlatformTemplate) { + constructor(app: IDrawApp, template: PlatformTemplate) { super( app, template, @@ -76,10 +76,10 @@ function buildAbsorbablePositions(platform: Platform): AbsorbablePosition[] { export class platformInteraction extends GraphicInteractionPlugin { static Name = 'platform_transform'; - constructor(app: JlDrawApp) { + constructor(app: IDrawApp) { super(platformInteraction.Name, app); } - static init(app: JlDrawApp) { + static init(app: IDrawApp) { return new platformInteraction(app); } filter(...grahpics: JlGraphic[]): Platform[] | undefined { diff --git a/src/graphics/polygon/PolygonDrawAssistant.ts b/src/graphics/polygon/PolygonDrawAssistant.ts index 34b853e..b65577a 100644 --- a/src/graphics/polygon/PolygonDrawAssistant.ts +++ b/src/graphics/polygon/PolygonDrawAssistant.ts @@ -7,11 +7,11 @@ import { } from 'pixi.js'; import { DraggablePoint, - GraphicApp, + IGraphicApp, GraphicDrawAssistant, GraphicInteractionPlugin, GraphicTransformEvent, - JlDrawApp, + IDrawApp, JlGraphic, linePoint, } from 'src/jl-graphic'; @@ -37,7 +37,7 @@ export class PolygonDraw extends GraphicDrawAssistant< points: Point[] = []; polygonGraphic: Graphics = new Graphics(); - constructor(app: JlDrawApp, template: PolygonTemplate) { + constructor(app: IDrawApp, template: PolygonTemplate) { super(app, template, 'sym_o_square', '多边形Polygon'); this.container.addChild(this.polygonGraphic); PolygonPointsEditPlugin.init(app); @@ -151,10 +151,10 @@ function onEditPointCreate(g: ILineGraphic, dp: DraggablePoint): void { */ export class PolygonPointsEditPlugin extends GraphicInteractionPlugin { static Name = 'PolygonPointsDrag'; - constructor(app: GraphicApp) { + constructor(app: IGraphicApp) { super(PolygonPointsEditPlugin.Name, app); } - static init(app: GraphicApp): PolygonPointsEditPlugin { + static init(app: IGraphicApp): PolygonPointsEditPlugin { return new PolygonPointsEditPlugin(app); } filter(...grahpics: JlGraphic[]): Polygon[] | undefined { diff --git a/src/graphics/rect/RectDrawAssistant.ts b/src/graphics/rect/RectDrawAssistant.ts index a43e327..a15bc2f 100644 --- a/src/graphics/rect/RectDrawAssistant.ts +++ b/src/graphics/rect/RectDrawAssistant.ts @@ -2,7 +2,7 @@ import { FederatedPointerEvent, Graphics, Point, IHitArea } from 'pixi.js'; import { GraphicDrawAssistant, GraphicInteractionPlugin, - JlDrawApp, + IDrawApp, JlGraphic, pointBox, } from 'src/jl-graphic'; @@ -18,7 +18,7 @@ export class RectDraw extends GraphicDrawAssistant { point2: Point | null = null; rectGraphic: Graphics = new Graphics(); - constructor(app: JlDrawApp, template: RectTemplate) { + constructor(app: IDrawApp, template: RectTemplate) { super(app, template, 'sym_o_square', '矩形Rect'); this.container.addChild(this.rectGraphic); rectInteraction.init(app); @@ -88,10 +88,10 @@ export class RectGraphicHitArea implements IHitArea { export class rectInteraction extends GraphicInteractionPlugin { static Name = 'platform_transform'; - constructor(app: JlDrawApp) { + constructor(app: IDrawApp) { super(rectInteraction.Name, app); } - static init(app: JlDrawApp) { + static init(app: IDrawApp) { return new rectInteraction(app); } filter(...grahpics: JlGraphic[]): Rect[] | undefined { diff --git a/src/graphics/runLine/RunLineDrawAssistant.ts b/src/graphics/runLine/RunLineDrawAssistant.ts index 914e690..d72de84 100644 --- a/src/graphics/runLine/RunLineDrawAssistant.ts +++ b/src/graphics/runLine/RunLineDrawAssistant.ts @@ -1,10 +1,10 @@ import { GraphicDrawAssistant, - JlDrawApp, + IDrawApp, JlGraphic, GraphicInteractionPlugin, linePoint, - GraphicApp, + IGraphicApp, AbsorbablePosition, DraggablePoint, GraphicTransformEvent, @@ -40,7 +40,7 @@ export class RunLineDraw extends GraphicDrawAssistant< points: Point[] = []; graphic: Graphics = new Graphics(); - constructor(app: JlDrawApp, template: RunLineTemplate) { + constructor(app: IDrawApp, template: RunLineTemplate) { super(app, template, 'sym_o_horizontal_rule', '运行线RunLine'); this.container.addChild(this.graphic); RunLinePointsEditPlugin.init(app); @@ -162,10 +162,10 @@ function onEditPointCreate( export class RunLinePointsEditPlugin extends GraphicInteractionPlugin { static Name = 'LinkPointsDrag'; - constructor(app: GraphicApp) { + constructor(app: IGraphicApp) { super(RunLinePointsEditPlugin.Name, app); } - static init(app: GraphicApp): RunLinePointsEditPlugin { + static init(app: IGraphicApp): RunLinePointsEditPlugin { return new RunLinePointsEditPlugin(app); } filter(...grahpics: JlGraphic[]): RunLine[] | undefined { diff --git a/src/graphics/section/SectionDrawAssistant.ts b/src/graphics/section/SectionDrawAssistant.ts index 95fd899..1a82c3d 100644 --- a/src/graphics/section/SectionDrawAssistant.ts +++ b/src/graphics/section/SectionDrawAssistant.ts @@ -1,13 +1,13 @@ import { ChildTransform, DraggablePoint, - GraphicApp, + IGraphicApp, GraphicDrawAssistant, GraphicInteractionPlugin, GraphicRelation, GraphicTransform, GraphicTransformEvent, - JlDrawApp, + IDrawApp, JlGraphic, VectorText, calculateLineMidpoint, @@ -60,7 +60,7 @@ export class SectionDraw extends GraphicDrawAssistant< points: Point[] = []; graphic = new Graphics(); - constructor(app: JlDrawApp, template: SectionTemplate) { + constructor(app: IDrawApp, template: SectionTemplate) { super(app, template, 'sym_o_timeline', '区段Section'); this.container.addChild(this.graphic); @@ -400,12 +400,12 @@ export class SectionPointEditPlugin extends GraphicInteractionPlugin
{ static Name = 'SectionPointDrag'; drawAssistant: SectionDraw; - constructor(app: GraphicApp, da: SectionDraw) { + constructor(app: IGraphicApp, da: SectionDraw) { super(SectionPointEditPlugin.Name, app); this.drawAssistant = da; app.registerMenu(SectionEditMenu); } - static init(app: GraphicApp, da: SectionDraw) { + static init(app: IGraphicApp, da: SectionDraw) { return new SectionPointEditPlugin(app, da); } filter(...grahpics: JlGraphic[]): Section[] | undefined { diff --git a/src/graphics/separator/SeparatorDrawAssistant.ts b/src/graphics/separator/SeparatorDrawAssistant.ts index 6d530d9..e244ecc 100644 --- a/src/graphics/separator/SeparatorDrawAssistant.ts +++ b/src/graphics/separator/SeparatorDrawAssistant.ts @@ -4,7 +4,7 @@ import { GraphicIdGenerator, GraphicInteractionPlugin, GraphicRelationParam, - JlDrawApp, + IDrawApp, JlGraphic, linePoint, } from 'src/jl-graphic'; @@ -25,7 +25,7 @@ export class SeparatorDraw extends GraphicDrawAssistant< ISeparatorData > { SeparatorGraph: Separator; - constructor(app: JlDrawApp, template: SeparatorTemplate) { + constructor(app: IDrawApp, template: SeparatorTemplate) { super(app, template, 'sym_o_square', '不展示'); this.SeparatorGraph = this.graphicTemplate.new(); this.container.addChild(this.SeparatorGraph); @@ -258,10 +258,10 @@ export class SeparatorGraphicHitArea implements IHitArea { export class SeparatorInteraction extends GraphicInteractionPlugin { static Name = 'Separator_transform'; - constructor(app: JlDrawApp) { + constructor(app: IDrawApp) { super(SeparatorInteraction.Name, app); } - static init(app: JlDrawApp) { + static init(app: IDrawApp) { return new SeparatorInteraction(app); } filter(...grahpics: JlGraphic[]): Separator[] | undefined { diff --git a/src/graphics/signal/SignalDrawAssistant.ts b/src/graphics/signal/SignalDrawAssistant.ts index 7971b55..3ac1bff 100644 --- a/src/graphics/signal/SignalDrawAssistant.ts +++ b/src/graphics/signal/SignalDrawAssistant.ts @@ -5,7 +5,7 @@ import { GraphicDrawAssistant, GraphicInteractionPlugin, GraphicTransformEvent, - JlDrawApp, + IDrawApp, JlGraphic, } from 'src/jl-graphic'; @@ -21,7 +21,7 @@ export class SignalDraw extends GraphicDrawAssistant< > { _signal: Signal | null = null; - constructor(app: JlDrawApp, template: SignalTemplate) { + constructor(app: IDrawApp, template: SignalTemplate) { super( app, template, @@ -129,10 +129,10 @@ function buildCodeAbsorbablePositions(signal: Signal): AbsorbablePosition[] { export class signalInteraction extends GraphicInteractionPlugin { static Name = 'signal_transform'; - constructor(app: JlDrawApp) { + constructor(app: IDrawApp) { super(signalInteraction.Name, app); } - static init(app: JlDrawApp) { + static init(app: IDrawApp) { return new signalInteraction(app); } filter(...grahpics: JlGraphic[]): Signal[] | undefined { diff --git a/src/graphics/station/StationDrawAssistant.ts b/src/graphics/station/StationDrawAssistant.ts index 15266cf..111af57 100644 --- a/src/graphics/station/StationDrawAssistant.ts +++ b/src/graphics/station/StationDrawAssistant.ts @@ -4,7 +4,7 @@ import { AbsorbablePosition, GraphicDrawAssistant, GraphicInteractionPlugin, - JlDrawApp, + IDrawApp, JlGraphic, } from 'src/jl-graphic'; @@ -19,7 +19,7 @@ export class StationDraw extends GraphicDrawAssistant< IStationData > { codeGraph: Station; - constructor(app: JlDrawApp, template: StationTemplate) { + constructor(app: IDrawApp, template: StationTemplate) { super( app, template, @@ -72,10 +72,10 @@ function buildAbsorbablePositions(station: Station): AbsorbablePosition[] { export class stationInteraction extends GraphicInteractionPlugin { static Name = 'station_transform'; - constructor(app: JlDrawApp) { + constructor(app: IDrawApp) { super(stationInteraction.Name, app); } - static init(app: JlDrawApp) { + static init(app: IDrawApp) { return new stationInteraction(app); } filter(...grahpics: JlGraphic[]): Station[] | undefined { diff --git a/src/graphics/stationLine/StationLineDrawAssistant.ts b/src/graphics/stationLine/StationLineDrawAssistant.ts index a329cb2..16c00ea 100644 --- a/src/graphics/stationLine/StationLineDrawAssistant.ts +++ b/src/graphics/stationLine/StationLineDrawAssistant.ts @@ -4,7 +4,7 @@ import { AbsorbablePosition, GraphicDrawAssistant, GraphicInteractionPlugin, - JlDrawApp, + IDrawApp, JlGraphic, } from 'src/jl-graphic'; @@ -24,7 +24,7 @@ export class StationLineDraw extends GraphicDrawAssistant< IStationLineData > { codeGraph: StationLine; - constructor(app: JlDrawApp, template: StationLineTemplate) { + constructor(app: IDrawApp, template: StationLineTemplate) { super( app, template, @@ -86,10 +86,10 @@ function buildAbsorbablePositions(Station: StationLine): AbsorbablePosition[] { export class stationLineInteraction extends GraphicInteractionPlugin { static Name = 'stationLine_transform'; static stationLine: StationLine; - constructor(app: JlDrawApp) { + constructor(app: IDrawApp) { super(stationLineInteraction.Name, app); } - static init(app: JlDrawApp) { + static init(app: IDrawApp) { return new stationLineInteraction(app); } filter(...grahpics: JlGraphic[]): StationLine[] | undefined { diff --git a/src/graphics/train/TrainDrawAssistant.ts b/src/graphics/train/TrainDrawAssistant.ts index 65577e0..8ea8153 100644 --- a/src/graphics/train/TrainDrawAssistant.ts +++ b/src/graphics/train/TrainDrawAssistant.ts @@ -2,7 +2,7 @@ import { Point, FederatedPointerEvent } from 'pixi.js'; import { GraphicDrawAssistant, GraphicInteractionPlugin, - JlDrawApp, + IDrawApp, JlGraphic, } from 'src/jl-graphic'; @@ -15,7 +15,7 @@ export interface ITrainDrawOptions { export class TrainDraw extends GraphicDrawAssistant { _Train: Train | null = null; - constructor(app: JlDrawApp, template: TrainTemplate) { + constructor(app: IDrawApp, template: TrainTemplate) { super(app, template, 'directions_bus_filled', '不展示'); trainInteraction.init(app); } @@ -48,10 +48,10 @@ export class TrainDraw extends GraphicDrawAssistant { export class trainInteraction extends GraphicInteractionPlugin { static Name = 'train_transform'; - constructor(app: JlDrawApp) { + constructor(app: IDrawApp) { super(trainInteraction.Name, app); } - static init(app: JlDrawApp) { + static init(app: IDrawApp) { return new trainInteraction(app); } filter(...grahpics: JlGraphic[]): Train[] | undefined { diff --git a/src/graphics/trainLine/TrainLineAssistant.ts b/src/graphics/trainLine/TrainLineAssistant.ts index ce26b49..765b5b0 100644 --- a/src/graphics/trainLine/TrainLineAssistant.ts +++ b/src/graphics/trainLine/TrainLineAssistant.ts @@ -2,7 +2,7 @@ import { FederatedMouseEvent, Point } from 'pixi.js'; import { GraphicDrawAssistant, GraphicInteractionPlugin, - JlDrawApp, + IDrawApp, JlGraphic, } from 'src/jl-graphic'; import { ITrainLineData, TrainLine, ItrainLineTemplate } from './TrainLine'; @@ -13,7 +13,7 @@ export class TrainLineDraw extends GraphicDrawAssistant< > { train: TrainLine | null = null; - constructor(app: JlDrawApp, template: ItrainLineTemplate) { + constructor(app: IDrawApp, template: ItrainLineTemplate) { super(app, template, 'directions_bus_filled', '列车线网'); ItrainLineInteraction.init(app); } @@ -51,10 +51,10 @@ export class TrainLineDraw extends GraphicDrawAssistant< export class ItrainLineInteraction extends GraphicInteractionPlugin { static Name = 'trainLine_transform'; - constructor(app: JlDrawApp) { + constructor(app: IDrawApp) { super(ItrainLineInteraction.Name, app); } - static init(app: JlDrawApp) { + static init(app: IDrawApp) { return new ItrainLineInteraction(app); } filter(...grahpics: JlGraphic[]): TrainLine[] | undefined { diff --git a/src/graphics/trainWindow/TrainWindowDrawAssistant.ts b/src/graphics/trainWindow/TrainWindowDrawAssistant.ts index 3d7029e..6a126be 100644 --- a/src/graphics/trainWindow/TrainWindowDrawAssistant.ts +++ b/src/graphics/trainWindow/TrainWindowDrawAssistant.ts @@ -5,7 +5,7 @@ import { GraphicDrawAssistant, GraphicIdGenerator, GraphicInteractionPlugin, - JlDrawApp, + IDrawApp, JlGraphic, } from 'src/jl-graphic'; @@ -69,7 +69,7 @@ export class TrainWindowDraw extends GraphicDrawAssistant< ITrainWindowData > { trainWindowGraph: TrainWindow; - constructor(app: JlDrawApp, template: TrainWindowTemplate) { + constructor(app: IDrawApp, template: TrainWindowTemplate) { super(app, template, 'sym_o_square', '不展示'); this.trainWindowGraph = this.graphicTemplate.new(); this.container.addChild(this.trainWindowGraph); @@ -243,10 +243,10 @@ function buildAbsorbablePositions( export class TrainWindowInteraction extends GraphicInteractionPlugin { static Name = 'TrainWindow_transform'; - constructor(app: JlDrawApp) { + constructor(app: IDrawApp) { super(TrainWindowInteraction.Name, app); } - static init(app: JlDrawApp) { + static init(app: IDrawApp) { return new TrainWindowInteraction(app); } filter(...grahpics: JlGraphic[]): TrainWindow[] | undefined { diff --git a/src/graphics/turnout/TurnoutDrawAssistant.ts b/src/graphics/turnout/TurnoutDrawAssistant.ts index 5441e4d..fd19ad7 100644 --- a/src/graphics/turnout/TurnoutDrawAssistant.ts +++ b/src/graphics/turnout/TurnoutDrawAssistant.ts @@ -1,12 +1,12 @@ import { AbsorbablePosition, DraggablePoint, - GraphicApp, + IGraphicApp, GraphicDrawAssistant, GraphicInteractionPlugin, GraphicRelation, GraphicTransformEvent, - JlDrawApp, + IDrawApp, JlGraphic, VectorText, linePoint, @@ -44,7 +44,7 @@ export class TurnoutDraw extends GraphicDrawAssistant< ITurnoutData > { turnout: Turnout; - constructor(app: JlDrawApp, template: TurnoutTemplate) { + constructor(app: IDrawApp, template: TurnoutTemplate) { super(app, template, 'sym_o_ramp_left', '道岔Turnout'); this.turnout = this.graphicTemplate.new(); @@ -205,11 +205,11 @@ const turnoutSectionEditMenu: ContextMenu = ContextMenu.init({ export class TurnoutPointsInteractionPlugin extends GraphicInteractionPlugin { static Name = 'TurnoutPointsDrag'; - static init(app: JlDrawApp) { + static init(app: IDrawApp) { return new TurnoutPointsInteractionPlugin(app); } - constructor(app: GraphicApp) { + constructor(app: IGraphicApp) { super(TurnoutPointsInteractionPlugin.Name, app); app.registerMenu(turnoutSectionEditMenu); }