-
-
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.
- Loading branch information
1 parent
ec4cef8
commit 82c57cd
Showing
3 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
projects/f-examples/extensions/minimap-example/minimap-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,9 @@ | ||
<f-flow fDraggable (fLoaded)="onLoaded()"> | ||
<f-canvas> | ||
<f-connection fOutputId="output1" fInputId="input1" fBehavior="floating"></f-connection> | ||
<div fNode [fNodePosition]="{ x: 24, y: 24 }" fNodeOutput fOutputId="output1" fDragHandle>I'm a node</div> | ||
<div fNode [fNodePosition]="{ x: 244, y: 24 }" fNodeInput fInputId="input1" fDragHandle>I'm a node</div> | ||
</f-canvas> | ||
<f-minimap [fMinSize]="2000"></f-minimap> | ||
</f-flow> | ||
|
10 changes: 10 additions & 0 deletions
10
projects/f-examples/extensions/minimap-example/minimap-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,10 @@ | ||
@use "../../flow-common"; | ||
|
||
::ng-deep minimap-example { | ||
@include flow-common.connection; | ||
@include flow-common.minimap; | ||
} | ||
|
||
.f-node { | ||
@include flow-common.node; | ||
} |
27 changes: 27 additions & 0 deletions
27
projects/f-examples/extensions/minimap-example/minimap-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,27 @@ | ||
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ViewChild } from '@angular/core'; | ||
import { FCanvasComponent, FFlowModule } from '@foblex/flow'; | ||
|
||
@Component({ | ||
selector: 'minimap-example', | ||
styleUrls: [ './minimap-example.component.scss' ], | ||
templateUrl: './minimap-example.component.html', | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
standalone: true, | ||
imports: [ | ||
FFlowModule | ||
] | ||
}) | ||
export class MinimapExampleComponent { | ||
|
||
@ViewChild(FCanvasComponent, { static: true }) | ||
public fCanvas!: FCanvasComponent; | ||
|
||
constructor( | ||
private changeDetectorRef: ChangeDetectorRef | ||
) { | ||
} | ||
|
||
public onLoaded(): void { | ||
this.fCanvas.resetScaleAndCenter(false); | ||
} | ||
} |