同步代码

This commit is contained in:
fan 2023-06-08 15:37:38 +08:00
parent ecd7c5e8dc
commit 373710676b
3 changed files with 18 additions and 19 deletions

@ -1 +1 @@
Subproject commit fe0ba85437c2601451e3fed4769441907cf8addf Subproject commit d7014486ded1b4741070a9b5bd92016622f0a267

View File

@ -894,8 +894,7 @@ export class GraphicApp extends EventEmitter<GraphicAppEvents> {
} }
} }
this.interactionPluginMap.forEach((plugin) => { this.interactionPluginMap.forEach((plugin) => {
// plugin.pause(); plugin.pause();
this.doPauseInteractionPlugin(plugin);
}); });
this.canvas.destroy(true); this.canvas.destroy(true);
this.viewport.destroy(); this.viewport.destroy();

View File

@ -187,7 +187,7 @@ export class GraphicTransformPlugin extends InteractionPluginBase {
this.app.on('graphicselectedchange', this.onGraphicSelectedChange, this); this.app.on('graphicselectedchange', this.onGraphicSelectedChange, this);
this.app.on( this.app.on(
'graphicchildselectedchange', 'graphicchildselectedchange',
this.onGraphicChildSelectedChange, this.onGraphicSelectedChange,
this this
); );
} }
@ -198,7 +198,7 @@ export class GraphicTransformPlugin extends InteractionPluginBase {
this.app.off('graphicselectedchange', this.onGraphicSelectedChange, this); this.app.off('graphicselectedchange', this.onGraphicSelectedChange, this);
this.app.off( this.app.off(
'graphicchildselectedchange', 'graphicchildselectedchange',
this.onGraphicChildSelectedChange, this.onGraphicSelectedChange,
this this
); );
} }
@ -335,7 +335,7 @@ export class GraphicTransformPlugin extends InteractionPluginBase {
br.visible = false; br.visible = false;
} }
} }
if (g.scalable) { if (g.scalable || g.rotatable) {
// 缩放点 // 缩放点
let sp = g.getAssistantAppend<TransformPoints>(TransformPoints.Name); let sp = g.getAssistantAppend<TransformPoints>(TransformPoints.Name);
if (!sp) { if (!sp) {
@ -350,19 +350,19 @@ export class GraphicTransformPlugin extends InteractionPluginBase {
} }
} }
onGraphicChildSelectedChange(child: DisplayObject, selected: boolean) { // onGraphicChildSelectedChange(child: DisplayObject, selected: boolean) {
let br = child.getAssistantAppend<BoundsGraphic>(BoundsGraphic.Name); // let br = child.getAssistantAppend<BoundsGraphic>(BoundsGraphic.Name);
if (!br) { // if (!br) {
// 绘制辅助包围框 // // 绘制辅助包围框
br = new BoundsGraphic(child); // br = new BoundsGraphic(child);
} // }
if (selected) { // if (selected) {
br.redraw(); // br.redraw();
br.visible = true; // br.visible = true;
} else { // } else {
br.visible = false; // br.visible = false;
} // }
} // }
} }
/** /**