aboutsummaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.ts
diff options
context:
space:
mode:
authorKAPIL SINGAL <ks220y@att.com>2020-06-23 16:46:54 +0000
committerGerrit Code Review <gerrit@onap.org>2020-06-23 16:46:54 +0000
commitaee530a92b14041b73d5c15bf4fa0709c92a82d0 (patch)
treef1583842e7ccc04346f3ee2903a587a29fd4db3e /cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.ts
parentc1ba2446334c41117ac67bd4a9288fe5cc8b9d1b (diff)
parent3cda867a2c5e86c3ba7173b456a2db19daf49036 (diff)
Merge "Fix "npm run build" errors"
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.ts')
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.ts77
1 files changed, 39 insertions, 38 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.ts
index e2a8d642b..9462caf68 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.ts
@@ -49,8 +49,8 @@ import { isDefined } from '@angular/compiler/src/util';
})
export class DesignerComponent implements OnInit, OnDestroy {
- private controllerSideBar: boolean;
- private attributesSideBar: boolean;
+ controllerSideBar: boolean;
+ attributesSideBar: boolean;
functionAttributeSidebar: boolean;
viewedPackage: BluePrintDetailModel = new BluePrintDetailModel();
customActionName: string;
@@ -62,31 +62,32 @@ export class DesignerComponent implements OnInit, OnDestroy {
paletteGraph: joint.dia.Graph;
palettePaper: joint.dia.Paper;
- private ngUnsubscribe = new Subject();
- private opt = { tx: 100, ty: 100 };
-
- constructor(private designerStore: DesignerStore,
- private functionStore: FunctionsStore,
- private graphUtil: GraphUtil,
- private graphGenerator: GraphGenerator,
- private route: ActivatedRoute,
- private designerService: DesignerService) {
+ ngUnsubscribe = new Subject();
+ opt = { tx: 100, ty: 100 };
+
+ constructor(
+ private designerStore: DesignerStore,
+ private functionStore: FunctionsStore,
+ private graphUtil: GraphUtil,
+ private graphGenerator: GraphGenerator,
+ private route: ActivatedRoute,
+ private designerService: DesignerService) {
this.controllerSideBar = true;
this.attributesSideBar = false;
this.showAction = false;
this.functionAttributeSidebar = false;
}
- private _toggleSidebar1() {
+ _toggleSidebar1() {
this.controllerSideBar = !this.controllerSideBar;
if (this.controllerSideBar === false) {
this.cl = 'editBar2';
- }
+ }
if (this.controllerSideBar === true) {
- this.cl = 'editBar';
- }
+ this.cl = 'editBar';
+ }
}
- private _toggleSidebar2() {
+ _toggleSidebar2() {
this.attributesSideBar = !this.attributesSideBar;
}
// private _toggleSidebar3() {
@@ -164,7 +165,7 @@ export class DesignerComponent implements OnInit, OnDestroy {
* auto arrange elements in graph
* https://resources.jointjs.com/docs/jointjs/v3.1/joint.html#layout.DirectedGraph
*/
- joint.layout.DirectedGraph.layout( this.boardGraph.getCells(), {
+ joint.layout.DirectedGraph.layout(this.boardGraph.getCells(), {
dagre,
graphlib,
setLinkVertices: false,
@@ -203,17 +204,17 @@ export class DesignerComponent implements OnInit, OnDestroy {
console.log('initializeBoard...');
this.boardGraph = new joint.dia.Graph();
this.boardPaper = new joint.dia.Paper({
- el: $('#board-paper'),
- model: this.boardGraph,
- // height: 720,
- // width: 1100,
- gridSize: 10,
- drawGrid: true,
- // background: {
- // color: 'rgba(0, 255, 0, 0.3)'
- // },
- cellViewNamespace: joint.shapes
- });
+ el: $('#board-paper'),
+ model: this.boardGraph,
+ // height: 720,
+ // width: 1100,
+ gridSize: 10,
+ drawGrid: true,
+ // background: {
+ // color: 'rgba(0, 255, 0, 0.3)'
+ // },
+ cellViewNamespace: joint.shapes
+ });
this.boardPaper.on('all', element => {
// console.log(element);
@@ -273,13 +274,13 @@ export class DesignerComponent implements OnInit, OnDestroy {
$('body').append(`
<div id="flyPaper"
style="position:fixed;z-index:100;opacity:.7;pointer-event:none;background-color: transparent !important;"></div>`
- );
+ );
const flyGraph = new joint.dia.Graph();
const flyPaper = new joint.dia.Paper({
- el: $('#flyPaper'),
- model: flyGraph,
- interactive: true
- });
+ el: $('#flyPaper'),
+ model: flyGraph,
+ interactive: true
+ });
const flyShape = draggedCell.model.clone();
const pos = draggedCell.model.position();
const offset = {
@@ -312,15 +313,15 @@ export class DesignerComponent implements OnInit, OnDestroy {
// step name is CDS realted terminology, please refer to tosca types
const stepName = functionType;
const functionElementForBoard = this.graphUtil.dropFunctionOverActionWithPosition(
- stepName, functionType,
- mouseupX, mouseupY,
- target, offset,
- this.boardGraph);
+ stepName, functionType,
+ mouseupX, mouseupY,
+ target, offset,
+ this.boardGraph);
const parentCell = this.graphUtil.getParent(functionElementForBoard, this.boardPaper);
if (parentCell &&
- parentCell.model.attributes.type === ActionElementTypeName &&
+ parentCell.model.attributes.type === ActionElementTypeName &&
this.graphUtil.canEmpedMoreChildern(parentCell.model, this.boardGraph)) {
if (this.graphUtil.isEmptyParent(parentCell.model)) {