src/app/shared/flo/graph-view/graph-view.component.ts
encapsulation | ViewEncapsulation.None |
selector | app-graph-view |
styleUrls | .flo.scss |
templateUrl | ./graph-view.component.html |
Properties |
|
Methods |
Inputs |
Outputs |
Accessors |
constructor()
|
dsl
|
Type: |
metamodel
|
Type: |
paperPadding
|
Default value: |
renderer
|
Type: |
floApi
|
$event type: EventEmitter
|
setEditorContext | ||||||||
setEditorContext(editorContext: Flo.EditorContext)
|
||||||||
Parameters :
Returns :
void
|
Private editorContext |
editorContext:
|
Type : Flo.EditorContext
|
flo |
getflo()
|
Returns :
Flo.EditorContext
|
import { Component, ViewEncapsulation, Input, Output, EventEmitter } from '@angular/core';
import { Flo } from 'spring-flo';
@Component({
selector: 'app-graph-view',
templateUrl: './graph-view.component.html',
styleUrls: [ '../flo.scss' ],
encapsulation: ViewEncapsulation.None
})
export class GraphViewComponent {
@Input()
dsl: string;
@Input()
paperPadding = 5;
@Input()
metamodel: Flo.Metamodel;
@Input()
renderer: Flo.Renderer;
@Output()
floApi = new EventEmitter<Flo.EditorContext>();
private editorContext: Flo.EditorContext;
constructor() {}
setEditorContext(editorContext: Flo.EditorContext) {
this.editorContext = editorContext;
this.editorContext.noPalette = true;
this.editorContext.readOnlyCanvas = true;
this.floApi.emit(this.editorContext);
}
get flo(): Flo.EditorContext {
return this.editorContext;
}
}
<div id="stream-graph-view-container">
<flo-editor (floApi)="setEditorContext($event)" [metamodel]="metamodel" [renderer]="renderer"
[dsl]="dsl" [paperPadding]="paperPadding" >
</flo-editor>
</div>