File

src/app/shared/flo/graph-view/graph-view.component.ts

Metadata

encapsulation ViewEncapsulation.None
selector app-graph-view
styleUrls .flo.scss
templateUrl ./graph-view.component.html

Index

Properties
Methods
Inputs
Outputs
Accessors

Constructor

constructor()

Inputs

dsl

Type: string

metamodel

Type: Flo.Metamodel

paperPadding

Default value: 5

renderer

Type: Flo.Renderer

Outputs

floApi $event type: EventEmitter

Methods

setEditorContext
setEditorContext(editorContext: Flo.EditorContext)
Parameters :
Name Type Optional Description
editorContext Flo.EditorContext
Returns : void

Properties

Private editorContext
editorContext: Flo.EditorContext
Type : Flo.EditorContext

Accessors

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>
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""