From d7014486ded1b4741070a9b5bd92016622f0a267 Mon Sep 17 00:00:00 2001 From: walker Date: Thu, 8 Jun 2023 15:29:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AD=90=E5=85=83=E7=B4=A0?= =?UTF-8?q?=E5=8F=98=E6=8D=A2=E6=97=A0=E6=95=88bug=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E5=8F=AA=E6=89=93=E5=BC=80=E6=97=8B=E8=BD=AC?= =?UTF-8?q?=E5=8F=98=E6=8D=A2bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/graphics/iscs-fan/IscsFanDrawAssistant.ts | 4 +-- .../plugins/GraphicTransformPlugin.ts | 32 +++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/graphics/iscs-fan/IscsFanDrawAssistant.ts b/src/graphics/iscs-fan/IscsFanDrawAssistant.ts index 71ae98f..5853991 100644 --- a/src/graphics/iscs-fan/IscsFanDrawAssistant.ts +++ b/src/graphics/iscs-fan/IscsFanDrawAssistant.ts @@ -66,12 +66,12 @@ export class IscsFanInteraction extends GraphicInteractionPlugin { bind(g: IscsFan): void { g.eventMode = 'static'; g.cursor = 'pointer'; - g.scalable = true; + // g.scalable = true; g.rotatable = true; } unbind(g: IscsFan): void { g.eventMode = 'none'; - g.scalable = false; + // g.scalable = false; g.rotatable = false; } } diff --git a/src/jlgraphic/plugins/GraphicTransformPlugin.ts b/src/jlgraphic/plugins/GraphicTransformPlugin.ts index d277651..cbc3cbd 100644 --- a/src/jlgraphic/plugins/GraphicTransformPlugin.ts +++ b/src/jlgraphic/plugins/GraphicTransformPlugin.ts @@ -187,7 +187,7 @@ export class GraphicTransformPlugin extends InteractionPluginBase { this.app.on('graphicselectedchange', this.onGraphicSelectedChange, this); this.app.on( 'graphicchildselectedchange', - this.onGraphicChildSelectedChange, + this.onGraphicSelectedChange, this ); } @@ -198,7 +198,7 @@ export class GraphicTransformPlugin extends InteractionPluginBase { this.app.off('graphicselectedchange', this.onGraphicSelectedChange, this); this.app.off( 'graphicchildselectedchange', - this.onGraphicChildSelectedChange, + this.onGraphicSelectedChange, this ); } @@ -335,7 +335,7 @@ export class GraphicTransformPlugin extends InteractionPluginBase { br.visible = false; } } - if (g.scalable) { + if (g.scalable || g.rotatable) { // 缩放点 let sp = g.getAssistantAppend(TransformPoints.Name); if (!sp) { @@ -350,19 +350,19 @@ export class GraphicTransformPlugin extends InteractionPluginBase { } } - onGraphicChildSelectedChange(child: DisplayObject, selected: boolean) { - let br = child.getAssistantAppend(BoundsGraphic.Name); - if (!br) { - // 绘制辅助包围框 - br = new BoundsGraphic(child); - } - if (selected) { - br.redraw(); - br.visible = true; - } else { - br.visible = false; - } - } + // onGraphicChildSelectedChange(child: DisplayObject, selected: boolean) { + // let br = child.getAssistantAppend(BoundsGraphic.Name); + // if (!br) { + // // 绘制辅助包围框 + // br = new BoundsGraphic(child); + // } + // if (selected) { + // br.redraw(); + // br.visible = true; + // } else { + // br.visible = false; + // } + // } } /**