-
-
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.
Merge pull request #31 from Foblex/minimap
Added Minimap
- Loading branch information
Showing
77 changed files
with
1,135 additions
and
64 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
8 changes: 8 additions & 0 deletions
8
projects/f-examples/minimap-basic-example/minimap-basic-example.component.html
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,8 @@ | ||
<f-flow fDraggable> | ||
<f-canvas> | ||
<f-connection fOutputId="output1" fInputId="input1"></f-connection> | ||
<div fNode fDragHandle [fNodePosition]="{ x: 24, y: 24 }" fNodeOutput fOutputId="output1" fOutputConnectableSide="right">Node 1</div> | ||
<div fNode fDragHandle [fNodePosition]="{ x: 244, y: 24 }" fNodeInput fInputId="input1" fInputConnectableSide="left">Node 2</div> | ||
</f-canvas> | ||
<f-minimap></f-minimap> | ||
</f-flow> |
52 changes: 52 additions & 0 deletions
52
projects/f-examples/minimap-basic-example/minimap-basic-example.component.scss
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,52 @@ | ||
:host ::ng-deep { | ||
|
||
.f-connection { | ||
.f-connection-drag-handle { | ||
fill: transparent; | ||
} | ||
|
||
.f-connection-selection { | ||
fill: none; | ||
} | ||
|
||
.f-connection-path { | ||
fill: none; | ||
stroke: #585858; | ||
stroke-width: 2; | ||
} | ||
} | ||
|
||
.f-minimap { | ||
background-color: var(--background-color); | ||
bottom: 16px; | ||
right: 16px; | ||
width: 120px; | ||
height: 120px; | ||
|
||
.f-minimap-node { | ||
fill: var(--primary-text); | ||
|
||
&.f-selected { | ||
fill: var(--primary-1); | ||
} | ||
} | ||
|
||
.f-minimap-view { | ||
fill: var(--primary-soft) | ||
} | ||
} | ||
} | ||
|
||
.f-node { | ||
width: 100px; | ||
padding: 12px; | ||
color: #585858; | ||
display: inline-flex; | ||
justify-content: center; | ||
align-items: center; | ||
text-align: center; | ||
background: #FCFDFE; | ||
border-radius: 4px; | ||
box-shadow: 0 0 1px 1px #E4E3E6; | ||
} | ||
|
16 changes: 16 additions & 0 deletions
16
projects/f-examples/minimap-basic-example/minimap-basic-example.component.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 { ChangeDetectionStrategy, Component } from '@angular/core'; | ||
import { FFlowModule } from '@foblex/flow'; | ||
|
||
@Component({ | ||
selector: 'minimap-basic-example', | ||
styleUrls: [ './minimap-basic-example.component.scss' ], | ||
templateUrl: './minimap-basic-example.component.html', | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
standalone: true, | ||
imports: [ | ||
FFlowModule | ||
] | ||
}) | ||
export class MinimapBasicExampleComponent { | ||
|
||
} |
8 changes: 8 additions & 0 deletions
8
projects/f-examples/minimap-scaled-example/minimap-scaled-example.component.html
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,8 @@ | ||
<f-flow fDraggable> | ||
<f-canvas> | ||
<f-connection fOutputId="output1" fInputId="input1"></f-connection> | ||
<div fNode fDragHandle [fNodePosition]="{ x: 24, y: 24 }" fNodeOutput fOutputId="output1" fOutputConnectableSide="right">Node 1</div> | ||
<div fNode fDragHandle [fNodePosition]="{ x: 244, y: 24 }" fNodeInput fInputId="input1" fInputConnectableSide="left">Node 2</div> | ||
</f-canvas> | ||
<f-minimap [fMinSize]="3000"></f-minimap> | ||
</f-flow> |
52 changes: 52 additions & 0 deletions
52
projects/f-examples/minimap-scaled-example/minimap-scaled-example.component.scss
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,52 @@ | ||
:host ::ng-deep { | ||
|
||
.f-connection { | ||
.f-connection-drag-handle { | ||
fill: transparent; | ||
} | ||
|
||
.f-connection-selection { | ||
fill: none; | ||
} | ||
|
||
.f-connection-path { | ||
fill: none; | ||
stroke: #585858; | ||
stroke-width: 2; | ||
} | ||
} | ||
|
||
.f-minimap { | ||
background-color: var(--background-color); | ||
bottom: 16px; | ||
right: 16px; | ||
width: 120px; | ||
height: 120px; | ||
|
||
.f-minimap-node { | ||
fill: var(--primary-text); | ||
|
||
&.f-selected { | ||
fill: var(--primary-1); | ||
} | ||
} | ||
|
||
.f-minimap-view { | ||
fill: var(--primary-soft) | ||
} | ||
} | ||
} | ||
|
||
.f-node { | ||
width: 100px; | ||
padding: 12px; | ||
color: #585858; | ||
display: inline-flex; | ||
justify-content: center; | ||
align-items: center; | ||
text-align: center; | ||
background: #FCFDFE; | ||
border-radius: 4px; | ||
box-shadow: 0 0 1px 1px #E4E3E6; | ||
} | ||
|
16 changes: 16 additions & 0 deletions
16
projects/f-examples/minimap-scaled-example/minimap-scaled-example.component.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 { ChangeDetectionStrategy, Component } from '@angular/core'; | ||
import { FFlowModule } from '@foblex/flow'; | ||
|
||
@Component({ | ||
selector: 'minimap-scaled-example', | ||
styleUrls: [ './minimap-scaled-example.component.scss' ], | ||
templateUrl: './minimap-scaled-example.component.html', | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
standalone: true, | ||
imports: [ | ||
FFlowModule | ||
] | ||
}) | ||
export class MinimapScaledExampleComponent { | ||
|
||
} |
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
19 changes: 19 additions & 0 deletions
19
projects/f-flow/src/domain/emit-transform-changes/emit-transform-changes.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,19 @@ | ||
import { EmitTransformChangesRequest } from './emit-transform-changes.request'; | ||
import { Injectable } from '@angular/core'; | ||
import { FExecutionRegister, IExecution } from '../../infrastructure'; | ||
import { FTransformStore } from '../../f-storage'; | ||
|
||
@Injectable() | ||
@FExecutionRegister(EmitTransformChangesRequest) | ||
export class EmitTransformChangesExecution | ||
implements IExecution<EmitTransformChangesRequest, void> { | ||
|
||
constructor( | ||
private fTransformStore: FTransformStore, | ||
) { | ||
} | ||
|
||
public handle(request: EmitTransformChangesRequest): void { | ||
this.fTransformStore.changes.next(); | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
projects/f-flow/src/domain/emit-transform-changes/emit-transform-changes.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 EmitTransformChangesRequest { | ||
|
||
} |
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 './emit-transform-changes.execution'; | ||
|
||
export * from './emit-transform-changes.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
3 changes: 3 additions & 0 deletions
3
projects/f-flow/src/domain/subscribe-on-transform-changes/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 './subscribe-on-transform-changes.execution'; | ||
|
||
export * from './subscribe-on-transform-changes.request'; |
24 changes: 24 additions & 0 deletions
24
...low/src/domain/subscribe-on-transform-changes/subscribe-on-transform-changes.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 { SubscribeOnTransformChangesRequest } from './subscribe-on-transform-changes.request'; | ||
import { Injectable } from '@angular/core'; | ||
import { merge, Observable } from 'rxjs'; | ||
import { FComponentsStore, FTransformStore } from '../../f-storage'; | ||
import { FExecutionRegister, IExecution } from '../../infrastructure'; | ||
|
||
@Injectable() | ||
@FExecutionRegister(SubscribeOnTransformChangesRequest) | ||
export class SubscribeOnTransformChangesExecution | ||
implements IExecution<SubscribeOnTransformChangesRequest, Observable<void>> { | ||
|
||
constructor( | ||
private fTransformStore: FTransformStore, | ||
private fComponentsStore: FComponentsStore | ||
) { | ||
} | ||
|
||
public handle(request: SubscribeOnTransformChangesRequest): Observable<void> { | ||
return merge( | ||
this.fTransformStore.changes, | ||
this.fComponentsStore.changes | ||
); | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
...-flow/src/domain/subscribe-on-transform-changes/subscribe-on-transform-changes.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 SubscribeOnTransformChangesRequest { | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
import { FCanvasComponent } from './f-canvas.component'; | ||
import { FZoomDirective } from './f-zoom'; | ||
|
||
export const F_CANVAS_PROVIDERS = [ | ||
|
||
FCanvasComponent, | ||
|
||
FZoomDirective | ||
]; |
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.