diff --git a/src/graphics/platform/PlatformDrawAssistant.ts b/src/graphics/platform/PlatformDrawAssistant.ts index e5d24df..fb6b17a 100644 --- a/src/graphics/platform/PlatformDrawAssistant.ts +++ b/src/graphics/platform/PlatformDrawAssistant.ts @@ -10,7 +10,6 @@ import { GraphicInteractionPlugin, JlDrawApp, JlGraphic, - KeyListener, getRectangleCenter, } from 'src/jlgraphic'; @@ -28,15 +27,6 @@ export class PlatformDraw extends GraphicDrawAssistant< platformGraphic: Graphics = new Graphics(); doorGraphic: Graphics = new Graphics(); - // 快捷绘制 - keypListener: KeyListener = new KeyListener({ - value: 'KeyP', - global: true, - onPress: () => { - this.graphicTemplate.hasdoor = true; - }, - }); - constructor(app: JlDrawApp, createData: () => IPlatformData) { super( app, @@ -53,11 +43,9 @@ export class PlatformDraw extends GraphicDrawAssistant< bind(): void { super.bind(); - this.app.addKeyboardListener(this.keypListener); } unbind(): void { super.unbind(); - this.app.removeKeyboardListener(this.keypListener); } clearCache(): void { diff --git a/src/graphics/rect/RectDrawAssistant.ts b/src/graphics/rect/RectDrawAssistant.ts index c40293f..e186ce4 100644 --- a/src/graphics/rect/RectDrawAssistant.ts +++ b/src/graphics/rect/RectDrawAssistant.ts @@ -14,7 +14,6 @@ import { GraphicTransformEvent, JlDrawApp, JlGraphic, - KeyListener, linePoint, } from 'src/jlgraphic'; @@ -44,15 +43,6 @@ export class RectDraw extends GraphicDrawAssistant { point2: Point | null = null; rectGraphic: Graphics = new Graphics(); - // 快捷绘制 - keypListener: KeyListener = new KeyListener({ - value: 'KeyR', - global: true, - onPress: () => { - //this.graphicTemplate.hasdoor = true; - }, - }); - constructor(app: JlDrawApp, createData: () => IRectData) { super(app, new RectTemplate(), createData, Rect.Type, '站台Rect'); this.container.addChild(this.rectGraphic); @@ -61,11 +51,9 @@ export class RectDraw extends GraphicDrawAssistant { bind(): void { super.bind(); - this.app.addKeyboardListener(this.keypListener); } unbind(): void { super.unbind(); - this.app.removeKeyboardListener(this.keypListener); } clearCache(): void { diff --git a/src/graphics/station/StationDrawAssistant.ts b/src/graphics/station/StationDrawAssistant.ts index bee53ae..2d73efd 100644 --- a/src/graphics/station/StationDrawAssistant.ts +++ b/src/graphics/station/StationDrawAssistant.ts @@ -4,7 +4,6 @@ import { GraphicInteractionPlugin, JlDrawApp, JlGraphic, - KeyListener, VectorText, } from 'src/jlgraphic'; @@ -21,15 +20,6 @@ export class StationDraw extends GraphicDrawAssistant< point: Point = new Point(0, 0); codeGraph: VectorText = new VectorText(''); - // 快捷绘制 - keypListener: KeyListener = new KeyListener({ - value: 'KeyO', - global: true, - onPress: () => { - //this.graphicTemplate.hasdoor = true; - }, - }); - constructor(app: JlDrawApp, createData: () => IStationData) { super(app, new StationTemplate(), createData, Station.Type, '车站Station'); this.container.addChild(this.codeGraph); @@ -38,11 +28,9 @@ export class StationDraw extends GraphicDrawAssistant< bind(): void { super.bind(); - this.app.addKeyboardListener(this.keypListener); } unbind(): void { super.unbind(); - this.app.removeKeyboardListener(this.keypListener); } clearCache(): void {