Shortcut options
This commit is contained in:
@@ -9,7 +9,8 @@
|
||||
<div id="flo-container">
|
||||
<flo-editor (floApi)="editorContext = $event" [metamodel]="metamodel" [renderer]="renderer" [editor]="editor"
|
||||
[paletteSize]="paletteSize" [paletteEntryPadding]="{width: 4, height: 4}" [(dsl)]="dsl"
|
||||
[paperPadding]="20" (validationMarkers)="markersChanged($event)" searchFilterPlaceHolder="Apps...">
|
||||
[paperPadding]="20" (validationMarkers)="markersChanged($event)" searchFilterPlaceHolder="Apps..."
|
||||
(onProperties)="editor.openPropertiesDialog($event)">
|
||||
<div header>
|
||||
<div id="controls" class="controls">
|
||||
<button class="button" id="clearGraph" (click)="editorContext.clearGraph()">Create New Flow</button>
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
[resizerRight]="'#paper-container'">
|
||||
</div>
|
||||
|
||||
<flo-editor-paper tabindex="0" (onDelete)="editorContext.deleteSelectedNode()">
|
||||
<flo-editor-paper tabindex="0" (onDelete)="editorContext.deleteSelectedNode()"
|
||||
(onProperties)="onPropertiesHandle()">
|
||||
<div id="paper" class="paper" tabindex="0" style="overflow: hidden; position: absolute; display: block; height:100%; width:100%; overflow:auto;"></div>
|
||||
<ng-content select="[canvas]"></ng-content>
|
||||
</flo-editor-paper>
|
||||
|
||||
@@ -164,6 +164,9 @@ export class EditorComponent implements OnInit, OnDestroy {
|
||||
@Output()
|
||||
private dslChange = new EventEmitter<string>();
|
||||
|
||||
@Output()
|
||||
onProperties = new EventEmitter<any>();
|
||||
|
||||
private _resizeHandler = () => this.autosizePaper();
|
||||
|
||||
|
||||
@@ -309,6 +312,12 @@ export class EditorComponent implements OnInit, OnDestroy {
|
||||
})();
|
||||
}
|
||||
|
||||
onPropertiesHandle() {
|
||||
if (this.editorContext.selection) {
|
||||
this.onProperties.emit(this.editorContext.selection.model)
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.initGraph();
|
||||
|
||||
|
||||
@@ -23,6 +23,9 @@ export class PaperComponent {
|
||||
@Output()
|
||||
onDelete = new EventEmitter<number>();
|
||||
|
||||
@Output()
|
||||
onProperties = new EventEmitter<number>();
|
||||
|
||||
@HostListener('click')
|
||||
click() {
|
||||
this.paperElement.nativeElement.focus();
|
||||
@@ -38,4 +41,9 @@ export class PaperComponent {
|
||||
this.onDelete.emit();
|
||||
}
|
||||
|
||||
@HostListener('keydown.o')
|
||||
oHandle() {
|
||||
this.onProperties.emit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user