-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: fixed remove on drop and drag to reassign tests
- Loading branch information
1 parent
3ff3322
commit a1a2a79
Showing
49 changed files
with
432 additions
and
263 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-421 KB
... drag connection from input to any place and remove the connection (failed).png
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
projects/f-flow/src/domain/f-flow/get-flow/get-flow-request.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export class GetFlowRequest { | ||
|
||
} |
20 changes: 20 additions & 0 deletions
20
projects/f-flow/src/domain/f-flow/get-flow/get-flow.execution.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { inject, Injectable } from '@angular/core'; | ||
import { FExecutionRegister, IExecution } from '@foblex/mediator'; | ||
import { GetFlowRequest } from './get-flow-request'; | ||
import { FComponentsStore } from '../../../f-storage'; | ||
import { FFlowBase } from '../../../f-flow'; | ||
|
||
@Injectable() | ||
@FExecutionRegister(GetFlowRequest) | ||
export class GetFlowExecution implements IExecution<GetFlowRequest, FFlowBase> { | ||
|
||
private _fComponentsStore = inject(FComponentsStore); | ||
|
||
public handle(request: GetFlowRequest): FFlowBase { | ||
const result = this._fComponentsStore.fFlow; | ||
if (!result) { | ||
throw new Error(`Flow not found in store`); | ||
} | ||
return result; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * from './get-flow.execution'; | ||
|
||
export * from './get-flow-request'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
.../src/domain/f-node/calculate-nodes-bounding-box/calculate-nodes-bounding-box.execution.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { IRect, RectExtensions } from '@foblex/2d'; | ||
import { CalculateNodesBoundingBoxRequest } from './calculate-nodes-bounding-box.request'; | ||
import { inject, Injectable } from '@angular/core'; | ||
import { FComponentsStore } from '../../../f-storage'; | ||
import { FExecutionRegister, IExecution } from '@foblex/mediator'; | ||
|
||
@Injectable() | ||
@FExecutionRegister(CalculateNodesBoundingBoxRequest) | ||
export class CalculateNodesBoundingBoxExecution implements IExecution<CalculateNodesBoundingBoxRequest, IRect | null> { | ||
|
||
private _fComponentsStore = inject(FComponentsStore); | ||
|
||
public handle(request: CalculateNodesBoundingBoxRequest): IRect | null { | ||
return RectExtensions.union(this._getNodesRects()); | ||
} | ||
|
||
private _getNodesRects(): IRect[] { | ||
return this._fComponentsStore.fNodes.map((x) => this._getElementRect(x.hostElement)); | ||
} | ||
|
||
private _getElementRect(element: HTMLElement): IRect { | ||
return RectExtensions.fromElement(element); | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
...ow/src/domain/f-node/calculate-nodes-bounding-box/calculate-nodes-bounding-box.request.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export class CalculateNodesBoundingBoxRequest { | ||
|
||
} |
3 changes: 3 additions & 0 deletions
3
projects/f-flow/src/domain/f-node/calculate-nodes-bounding-box/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * from './calculate-nodes-bounding-box.execution'; | ||
|
||
export * from './calculate-nodes-bounding-box.request'; |
3 changes: 3 additions & 0 deletions
3
projects/f-flow/src/domain/f-node/get-nodes/get-nodes-request.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export class GetNodesRequest { | ||
|
||
} |
16 changes: 16 additions & 0 deletions
16
projects/f-flow/src/domain/f-node/get-nodes/get-nodes.execution.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { inject, Injectable } from '@angular/core'; | ||
import { FExecutionRegister, IExecution } from '@foblex/mediator'; | ||
import { GetNodesRequest } from './get-nodes-request'; | ||
import { FComponentsStore } from '../../../f-storage'; | ||
import { FNodeBase } from '../../../f-node'; | ||
|
||
@Injectable() | ||
@FExecutionRegister(GetNodesRequest) | ||
export class GetNodesExecution implements IExecution<GetNodesRequest, FNodeBase[]> { | ||
|
||
private _fComponentsStore = inject(FComponentsStore); | ||
|
||
public handle(request: GetNodesRequest): FNodeBase[] { | ||
return this._fComponentsStore.fNodes; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * from './get-nodes.execution'; | ||
|
||
export * from './get-nodes-request'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.