Skip to content

Commit 978d764

Browse files
feat: Updated f-canvas user api
1 parent 644cba6 commit 978d764

84 files changed

Lines changed: 539 additions & 395 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

projects/f-flow/src/domain/create-connection-markers/create-connection-markers.execution.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,23 @@ import { FConnectionBase, FMarkerBase } from '../../f-connection';
44
import { FExecutionRegister, IExecution } from '@foblex/mediator';
55
import { BrowserService } from '@foblex/platform';
66
import { normalizeDomElementId } from '@foblex/utils';
7+
import { FComponentsStore } from '../../f-storage';
78

89
@Injectable()
910
@FExecutionRegister(CreateConnectionMarkersRequest)
1011
export class CreateConnectionMarkersExecution implements IExecution<CreateConnectionMarkersRequest, void> {
1112

1213
constructor(
13-
private fBrowser: BrowserService
14+
private fBrowser: BrowserService,
15+
private fComponentsStore: FComponentsStore
1416
) {
1517
}
1618

1719
public handle(request: CreateConnectionMarkersRequest): void {
1820
const element: SVGDefsElement = createSVGElement('defs', this.fBrowser);
1921
const fConnection = request.fConnection;
2022

21-
fConnection.fMarkers.forEach((marker) => {
23+
this.getMarkers(fConnection).forEach((marker) => {
2224

2325
const markerElement = this.createMarkerElement(marker, fConnection.fId);
2426

@@ -37,6 +39,10 @@ export class CreateConnectionMarkersExecution implements IExecution<CreateConnec
3739
this.makeSafariCompatible(fConnection);
3840
}
3941

42+
public getMarkers(fConnection: FConnectionBase): FMarkerBase[] {
43+
return this.fComponentsStore.fMarkers.filter((x) => fConnection.hostElement.contains(x.hostElement));
44+
}
45+
4046
// Safari does not support markers on path elements if markers are defined after the path element
4147
private makeSafariCompatible(fConnection: FConnectionBase): void {
4248
fConnection.fPath.hostElement.replaceWith(fConnection.fPath.hostElement);

projects/f-flow/src/domain/clear-selection/clear-selection.execution.spec.ts renamed to projects/f-flow/src/domain/f-selection/clear-selection/clear-selection.execution.spec.ts

File renamed without changes.

projects/f-flow/src/domain/clear-selection/clear-selection.execution.ts renamed to projects/f-flow/src/domain/f-selection/clear-selection/clear-selection.execution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { ClearSelectionRequest } from './clear-selection.request';
22
import { Injectable } from '@angular/core';
33
import { FExecutionRegister, IExecution } from '@foblex/mediator';
4-
import { FDraggableDataContext } from '../../f-draggable';
4+
import { FDraggableDataContext } from '../../../f-draggable';
55

66
@Injectable()
77
@FExecutionRegister(ClearSelectionRequest)

projects/f-flow/src/domain/clear-selection/clear-selection.request.ts renamed to projects/f-flow/src/domain/f-selection/clear-selection/clear-selection.request.ts

File renamed without changes.

projects/f-flow/src/domain/clear-selection/index.ts renamed to projects/f-flow/src/domain/f-selection/clear-selection/index.ts

File renamed without changes.

projects/f-flow/src/domain/get-selection/get-selection.execution.spec.ts renamed to projects/f-flow/src/domain/f-selection/get-selection/get-selection.execution.spec.ts

File renamed without changes.

projects/f-flow/src/domain/get-selection/get-selection.execution.ts renamed to projects/f-flow/src/domain/f-selection/get-selection/get-selection.execution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { GetSelectionRequest } from './get-selection.request';
22
import { Injectable } from '@angular/core';
33
import { FExecutionRegister, IExecution } from '@foblex/mediator';
4-
import { FDraggableDataContext, FSelectionChangeEvent } from '../../f-draggable';
4+
import { FDraggableDataContext, FSelectionChangeEvent } from '../../../f-draggable';
55

66
@Injectable()
77
@FExecutionRegister(GetSelectionRequest)

projects/f-flow/src/domain/get-selection/get-selection.request.ts renamed to projects/f-flow/src/domain/f-selection/get-selection/get-selection.request.ts

File renamed without changes.

projects/f-flow/src/domain/get-selection/index.ts renamed to projects/f-flow/src/domain/f-selection/get-selection/index.ts

File renamed without changes.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
export * from './clear-selection';
2+
3+
export * from './get-selection';
4+
5+
export * from './select';
6+
7+
export * from './select-all';
8+
9+
export * from './select-and-update-node-layer';
10+
11+
export * from './providers';

0 commit comments

Comments
 (0)