Designer component changes 47/78847/1
authorArundathi Patil <arundpil@in.ibm.com>
Wed, 20 Feb 2019 14:45:57 +0000 (20:15 +0530)
committerIBM602-PC0F1E3C\Arundathi <arundpil@in.ibm.com>
Wed, 20 Feb 2019 14:46:07 +0000 (20:16 +0530)
added output event emiter for node select event

Issue-ID: CCSDK-975
Change-Id: Id4281e2d6b5d06413ac38504fdd2f38169398a17
Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
cds-ui/client/src/app/feature-modules/blueprint/modify-template/designer/designer.component.ts

index b332f8f..b8f88d9 100644 (file)
@@ -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);
+}
+
 }