File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed
libs/visual-programming-system/src/components Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -622,7 +622,30 @@ export class NodeSelector<T extends BaseNodeInfo> {
622622 const nodeInfo = (
623623 nodeInSelection as unknown as IRectNodeComponent < T >
624624 ) . nodeInfo ;
625- if ( nodeInfo ) {
625+ if ( nodeInfo && ! nodeInfo . isGroup ) {
626+ if ( nodeInfo . isInGroup && nodeInfo . groupId ) {
627+ const group = this . canvasApp . elements . get (
628+ nodeInfo . groupId
629+ ) as unknown as IRectNodeComponent < BaseNodeInfo > ;
630+ if ( group ) {
631+ const groupNodeInfo =
632+ group . nodeInfo as unknown as BaseNodeInfo ;
633+ if (
634+ groupNodeInfo &&
635+ group . nodesInGroup &&
636+ groupNodeInfo . groupedNodeIds
637+ ) {
638+ groupNodeInfo . groupedNodeIds =
639+ groupNodeInfo . groupedNodeIds . filter (
640+ ( groupNodeId ) => groupNodeId !== nodeInSelection . id
641+ ) ;
642+
643+ group . nodesInGroup = group . nodesInGroup ?. filter (
644+ ( nodeInGroup ) => nodeInGroup . id !== nodeInSelection . id
645+ ) ;
646+ }
647+ }
648+ }
626649 nodeInfo . isInGroup = true ;
627650 nodeInfo . groupId = node . id ;
628651 }
You can’t perform that action at this time.
0 commit comments