summaryrefslogtreecommitdiffstats
path: root/sdc-workflow-designer-ui/src/app/app.component.ts
diff options
context:
space:
mode:
authorLvbo163 <lv.bo163@zte.com.cn>2017-08-29 10:07:13 +0800
committerLvbo163 <lv.bo163@zte.com.cn>2017-08-29 10:07:13 +0800
commit95141017fb4dfe5c3ad4b9dcc255ccd949944ccf (patch)
tree4891a20aeffb39876e5f4595c3183d18a4d9b668 /sdc-workflow-designer-ui/src/app/app.component.ts
parentdf81658e252dd886f30e984f1aa4a5f3917cd134 (diff)
support add workflow node
add toolbar, support add workflow nodes to edit area Issue-ID: SDC-255 Change-Id: I84353644c3947a3298f3f71e51085311456a33e3 Signed-off-by: Lvbo163 <lv.bo163@zte.com.cn>
Diffstat (limited to 'sdc-workflow-designer-ui/src/app/app.component.ts')
-rw-r--r--sdc-workflow-designer-ui/src/app/app.component.ts30
1 files changed, 7 insertions, 23 deletions
diff --git a/sdc-workflow-designer-ui/src/app/app.component.ts b/sdc-workflow-designer-ui/src/app/app.component.ts
index 32500abb..b02ce675 100644
--- a/sdc-workflow-designer-ui/src/app/app.component.ts
+++ b/sdc-workflow-designer-ui/src/app/app.component.ts
@@ -12,6 +12,8 @@
import { Component, AfterViewInit } from '@angular/core';
import { JsPlumbService } from "./services/jsplumb.service";
+import { WorkflowService } from "./services/workflow.service";
+import { WorkflowNode } from "./model/workflow-node";
@Component({
selector: 'app-root',
@@ -19,31 +21,13 @@ import { JsPlumbService } from "./services/jsplumb.service";
styleUrls: ['./app.component.css']
})
export class AppComponent implements AfterViewInit {
- constructor(private jsplumbService: JsPlumbService) {}
+ constructor(private jsplumbService: JsPlumbService, private workflowService: WorkflowService) {}
- public nodes = [
- {
- id: '001',
- name: 'node001',
- top: 50,
- left: 50,
- },
- {
- id: '002',
- name: 'node002',
- top: 250,
- left: 50,
- },
- {
- id: '003',
- name: 'node003',
- top: 140,
- left: 450,
- },
- ];
+ public getNodes(): WorkflowNode[] {
+ return this.workflowService.getNodes();
+ }
ngAfterViewInit(): void {
- this.jsplumbService.initJsPlumbInstance();
- this.jsplumbService.initNode('.node');
+ this.jsplumbService.buttonDroppable();
}
}