From 8f0563aed82049d36e2480dd2843d888bc0f2964 Mon Sep 17 00:00:00 2001 From: Arundathi Patil Date: Wed, 20 Feb 2019 20:15:57 +0530 Subject: Designer component changes added output event emiter for node select event Issue-ID: CCSDK-975 Change-Id: Id4281e2d6b5d06413ac38504fdd2f38169398a17 Signed-off-by: Arundathi Patil --- .../modify-template/designer/designer.component.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'cds-ui/client/src/app') diff --git a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/designer/designer.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/designer/designer.component.ts index b332f8fe4..b8f88d90c 100644 --- a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/designer/designer.component.ts +++ b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/designer/designer.component.ts @@ -19,7 +19,7 @@ limitations under the License. ============LICENSE_END============================================ */ -import { Component, OnInit, ViewChild, ElementRef } from '@angular/core'; +import { Component, OnInit, ViewChild, ElementRef, Output, EventEmitter } from '@angular/core'; import * as d3 from 'd3'; import { text } from 'd3'; @@ -29,7 +29,7 @@ import { text } from 'd3'; styleUrls: ['./designer.component.scss'] }) export class DesignerComponent implements OnInit { - + @Output() onNodeSelect = new EventEmitter(); @ViewChild('svgArea') graphContainer: ElementRef; dataForsimulation; svg; @@ -116,8 +116,6 @@ export class DesignerComponent implements OnInit { .attr('cx', 97) .attr('cy', 20) .attr('r', 5) - .attr('width', 10) - .attr('height', 10) .attr('fill', 'orange') if(d.requirementsArray) { @@ -127,8 +125,6 @@ export class DesignerComponent implements OnInit { .attr('cx', 97) .attr('cy', 60) .attr('r', 5) - .attr('width', 10) - .attr('height', 10) .attr('fill', 'blue') requirement.x = xbyMath + 95; requirement.y = ybyMath + 60; @@ -142,8 +138,6 @@ export class DesignerComponent implements OnInit { .attr('cx', 97) .attr('cy', 40) .attr('r', 5) - .attr('width', 10) - .attr('height', 10) .attr('fill', 'green'); capability.x = xbyMath + 97; capability.y = ybyMath + 40; @@ -245,4 +239,8 @@ export class DesignerComponent implements OnInit { console.log('mouse over'); } + trigerNodeSelectEvent(d) { + this.onNodeSelect.emit(d); +} + } -- cgit 1.2.3-korg