src/app/tasks/components/flo/task-graph-view/task-graph-view.component.ts
selector | app-task-graph-view |
styleUrls | task-graph-view.component.scss |
templateUrl | ./task-graph-view.component.html |
Properties |
|
Methods |
Inputs |
Accessors |
constructor(metamodelService: MetamodelService, renderService: RenderService)
|
||||||||||||
Parameters :
|
dsl
|
Type: |
paperPadding
|
Default value: |
ngOnInit |
ngOnInit()
|
Returns :
void
|
setEditorContext | ||||||||
setEditorContext(editorContext: Flo.EditorContext)
|
||||||||
Parameters :
Returns :
void
|
Private editorContext |
editorContext:
|
Type : Flo.EditorContext
|
Public metamodelService |
metamodelService:
|
Type : MetamodelService
|
Public renderService |
renderService:
|
Type : RenderService
|
flo |
getflo()
|
Returns :
Flo.EditorContext
|
import { Component, Input, OnInit } from '@angular/core';
import { Flo } from 'spring-flo';
import { MetamodelService } from '../metamodel.service';
import { RenderService } from '../render.service';
@Component({
selector: 'app-task-graph-view',
templateUrl: './task-graph-view.component.html',
styleUrls: ['./task-graph-view.component.scss']
})
export class TaskGraphViewComponent implements OnInit {
@Input()
dsl: string;
@Input()
paperPadding = 5;
private editorContext: Flo.EditorContext;
constructor(public metamodelService: MetamodelService,
public renderService: RenderService) {
}
ngOnInit() {
}
setEditorContext(editorContext: Flo.EditorContext) {
this.editorContext = editorContext;
this.editorContext.noPalette = true;
this.editorContext.readOnlyCanvas = true;
}
get flo(): Flo.EditorContext {
return this.editorContext;
}
}
<div id="task-graph-view-container">
<flo-editor (floApi)="setEditorContext($event)" [metamodel]="metamodelService" [renderer]="renderService"
[dsl]="dsl" [paperPadding]="paperPadding" >
</flo-editor>
</div>