aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/pages/composition/graph/composition-graph.component.ts
diff options
context:
space:
mode:
authorstasys10 <stasys.jurgaitis@est.tech>2022-01-04 14:15:06 +0000
committerMichael Morris <michael.morris@est.tech>2022-02-02 11:34:41 +0000
commitd76c30d1156c7fa52fa9ab8a8df9562181ecacba (patch)
treeed197c4dc5d5e8c09d482706add241a91a97acd7 /catalog-ui/src/app/ng2/pages/composition/graph/composition-graph.component.ts
parent17862485d3475a81aa836f84609ec1a2b69b1d64 (diff)
fix policy and group drag and drop bug
Issue-ID: SDC-3864 Signed-off-by: stasys10 <stasys.jurgaitis@est.tech> Change-Id: Ib45b4a1b650a7d5959e4a6ff70d46d6dee0586c2
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.ts13
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);