diff --git a/src/control/BasicPanel.ts b/src/control/BasicPanel.ts index 5f16d0e5..077e10bc 100644 --- a/src/control/BasicPanel.ts +++ b/src/control/BasicPanel.ts @@ -522,7 +522,7 @@ class BasicPanel extends Panel { } override show(nodes: Node[]) { - this.nodes = nodes; + super.show(nodes); this.data = []; const panel = this.panel; if (this.listener.state === State.EDIT_GEOM) { diff --git a/src/control/BlurPanel.ts b/src/control/BlurPanel.ts index a257b9a8..6f0a7ba5 100644 --- a/src/control/BlurPanel.ts +++ b/src/control/BlurPanel.ts @@ -356,7 +356,7 @@ class BlurPanel extends Panel { } override show(nodes: Node[]) { - this.nodes = nodes; + super.show(nodes); const panel = this.panel; if (!nodes.length || this.listener.state === State.EDIT_GEOM) { panel.style.display = 'none'; diff --git a/src/control/Geometry.ts b/src/control/Geometry.ts index 3889a116..8587d3bd 100644 --- a/src/control/Geometry.ts +++ b/src/control/Geometry.ts @@ -156,6 +156,7 @@ export default class Geometry { node.refresh(); node.checkPointsChange(); this.show(node); + listener.emit(Listener.POINT_NODE, [node]); } } } @@ -217,6 +218,7 @@ export default class Geometry { if (isDrag || isControlF || isControlT) { isDrag = isControlF = isControlT = false; this.update(); + listener.emit(Listener.POINT_NODE, [this.node]); } }); diff --git a/src/control/Listener.ts b/src/control/Listener.ts index 77f132e5..f0017611 100644 --- a/src/control/Listener.ts +++ b/src/control/Listener.ts @@ -2033,6 +2033,7 @@ export default class Listener extends Event { static VISIBLE_NODE = 'VISIBLE_NODE'; static ART_BOARD_NODE = 'ART_BOARD_NODE'; static CONSTRAIN_PROPORTION_NODE = 'CONSTRAIN_PROPORTION_NODE'; + static POINT_NODE = 'POINT_NODE'; static ZOOM_PAGE = 'ZOOM_PAGE'; static CONTEXT_MENU = 'CONTEXT_MENU'; static STATE_CHANGE = 'STATE_CHANGE'; diff --git a/src/control/OpacityPanel.ts b/src/control/OpacityPanel.ts index 5c83f1e5..c6832fd3 100644 --- a/src/control/OpacityPanel.ts +++ b/src/control/OpacityPanel.ts @@ -175,8 +175,8 @@ class OpacityPanel extends Panel { }); } - show(nodes: Node[]) { - this.nodes = nodes; + override show(nodes: Node[]) { + super.show(nodes); const panel = this.panel; if (!nodes.length || this.listener.state === State.EDIT_GEOM) { panel.style.display = 'none'; diff --git a/src/control/ShadowPanel.ts b/src/control/ShadowPanel.ts index 6ac54a6e..ee15d6bd 100644 --- a/src/control/ShadowPanel.ts +++ b/src/control/ShadowPanel.ts @@ -371,8 +371,8 @@ class ShadowPanel extends Panel { }); } - show(nodes: Node[]) { - this.nodes = nodes; + override show(nodes: Node[]) { + super.show(nodes); const panel = this.panel; // 老的清除 this.panel.querySelectorAll('.line').forEach(item => {