@@ -7,7 +7,7 @@ import { FComponentsStore } from '../../f-storage';
77import { FDraggableDataContext } from '../f-draggable-data-context' ;
88import { ISelectable } from '../../mixins' ;
99import { FNodeBase } from '../../f-node' ;
10- import { IPointerEvent } from " ../../drag-toolkit" ;
10+ import { IPointerEvent } from ' ../../drag-toolkit' ;
1111
1212/**
1313 * Implements the functionality for selecting elements in a graphical interface.
@@ -50,7 +50,6 @@ import { IPointerEvent } from "../../drag-toolkit";
5050@Injectable ( )
5151@FExecutionRegister ( FSingleSelectRequest )
5252export class FSingleSelectExecution implements IExecution < FSingleSelectRequest , void > {
53-
5453 private readonly _fMediator = inject ( FMediator ) ;
5554 private readonly _store = inject ( FComponentsStore ) ;
5655 private readonly _dragContext = inject ( FDraggableDataContext ) ;
@@ -80,12 +79,18 @@ export class FSingleSelectExecution implements IExecution<FSingleSelectRequest,
8079 }
8180
8281 private _getNodeOrGroup ( targetElement : HTMLElement ) : FNodeBase | undefined {
83- return this . _store . fNodes . find ( ( x ) => ( x ) . isContains ( targetElement ) ) ;
82+ return this . _store . fNodes . find ( ( x ) => x . isContains ( targetElement ) ) ;
8483 }
8584
8685 private _getConnection ( element : HTMLElement | SVGElement ) : FConnectionBase | undefined {
87- return this . _store . fConnections
88- . find ( c => c . isContains ( element ) || c . fConnectionCenter ( ) ?. nativeElement ?. contains ( element ) ) ;
86+ return this . _store . fConnections . find (
87+ ( c ) =>
88+ c . isContains ( element ) ||
89+ c . fConnectionCenter ( ) ?. nativeElement ?. contains ( element ) ||
90+ Array . from ( c . fConnectionContents ( ) ?. values ( ) ?? [ ] ) . some ( ( content ) =>
91+ content . hostElement ?. contains ( element ) ,
92+ ) ,
93+ ) ;
8994 }
9095
9196 private _updateItemAndChildrenLayers ( fItem ?: ISelectable ) : void {
0 commit comments