}
public onDrop = (dndEvent: DndDropEvent) => {
+ if (dndEvent.data.categoryType=="POLICY" || dndEvent.data.categoryType=="GROUP"){
+ this.compositionGraphPaletteUtils.addPolicyOrGroupFromPalette(dndEvent);
+ return;
+ }
this.compositionGraphPaletteUtils.addNodeFromPalette(this._cy, dndEvent);
}
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) => {
});
});
- 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);