diff options
Diffstat (limited to 'catalog-ui/src/app/ng2/pages/composition/graph/composition-graph.component.ts')
-rw-r--r-- | catalog-ui/src/app/ng2/pages/composition/graph/composition-graph.component.ts | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/catalog-ui/src/app/ng2/pages/composition/graph/composition-graph.component.ts b/catalog-ui/src/app/ng2/pages/composition/graph/composition-graph.component.ts index 1328747f88..6bbf1afab9 100644 --- a/catalog-ui/src/app/ng2/pages/composition/graph/composition-graph.component.ts +++ b/catalog-ui/src/app/ng2/pages/composition/graph/composition-graph.component.ts @@ -184,6 +184,10 @@ export class CompositionGraphComponent implements AfterViewInit { } public onDrop = (dndEvent: DndDropEvent) => { + if (dndEvent.data.categoryType=="POLICY" || dndEvent.data.categoryType=="GROUP"){ + this.compositionGraphPaletteUtils.addPolicyOrGroupFromPalette(dndEvent); + return; + } this.compositionGraphPaletteUtils.addNodeFromPalette(this._cy, dndEvent); } @@ -600,10 +604,6 @@ export class CompositionGraphComponent implements AfterViewInit { this.notificationService.push(new NotificationSettings('success', 'Policy Updated', 'Success')); }); - this.eventListenerService.registerObserverCallback(GRAPH_EVENTS.ON_PALETTE_COMPONENT_HOVER_IN, (leftPaletteComponent: LeftPaletteComponent) => { - this.compositionGraphPaletteUtils.onComponentHoverIn(leftPaletteComponent, this._cy); - }); - this.eventListenerService.registerObserverCallback(GRAPH_EVENTS.ON_ADD_ZONE_INSTANCE_FROM_PALETTE, (component: TopologyTemplate, paletteComponent: LeftPaletteComponent, startPosition: Point) => { @@ -620,11 +620,6 @@ export class CompositionGraphComponent implements AfterViewInit { }); }); - this.eventListenerService.registerObserverCallback(GRAPH_EVENTS.ON_PALETTE_COMPONENT_HOVER_OUT, () => { - this._cy.emit('hidehandles'); - this.matchCapabilitiesRequirementsUtils.resetFadedNodes(this._cy); - }); - this.eventListenerService.registerObserverCallback(GRAPH_EVENTS.ON_PALETTE_COMPONENT_DRAG_START, (dragElement, dragComponent) => { this.dragElement = dragElement; this.dragComponent = ComponentInstanceFactory.createComponentInstanceFromComponent(dragComponent, this.workspaceService.metadata.categories[0].useServiceSubstitutionForNestedServices); |