From a2c2855a1fa45dd5d14481c9c9ade2af8aaa797b Mon Sep 17 00:00:00 2001 From: Oleg Ivaniv Date: Fri, 6 Dec 2024 14:15:42 +0100 Subject: [PATCH] feat(editor-ui): add node controls slot to canvas components Add a new slot 'node-controls' to Canvas components hierarchy (Canvas, WorkflowCanvas, CanvasNode) to allow custom node controls injection. The slot provides node data and class toggle functionality to customize node appearance. --- .../src/components/canvas/Canvas.vue | 6 ++++- .../src/components/canvas/WorkflowCanvas.vue | 6 ++++- .../canvas/elements/nodes/CanvasNode.vue | 26 ++++++++++++++++++- 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/packages/editor-ui/src/components/canvas/Canvas.vue b/packages/editor-ui/src/components/canvas/Canvas.vue index ed4012c195..bff3634e5e 100644 --- a/packages/editor-ui/src/components/canvas/Canvas.vue +++ b/packages/editor-ui/src/components/canvas/Canvas.vue @@ -663,7 +663,11 @@ provide(CanvasKey, { @update="onUpdateNodeParameters" @move="onUpdateNodePosition" @add="onClickNodeAdd" - /> + > + + +
+ +
+ { opacity: 1; } } + +.nodeControls { + position: absolute; + bottom: 100%; + z-index: 1; + width: 100%; + margin: auto; + display: flex; + justify-content: center; +}