diff --git a/CSETWebApi/CSETWeb_Api/CSETWeb_ApiCore/Diagram/src/main/webapp/js/app.min.js b/CSETWebApi/CSETWeb_Api/CSETWeb_ApiCore/Diagram/src/main/webapp/js/app.min.js index af869e2bfb..173873314e 100644 --- a/CSETWebApi/CSETWeb_Api/CSETWeb_ApiCore/Diagram/src/main/webapp/js/app.min.js +++ b/CSETWebApi/CSETWeb_Api/CSETWeb_ApiCore/Diagram/src/main/webapp/js/app.min.js @@ -2506,9 +2506,9 @@ Sidebar.prototype.createItem=function(a,b,d,c,f,e,h,l,k,m,g,n,p,r){l=null!=l?l:! this.editorUi.editor.graph.defaultEdgeStyle,!0,!0);null!=n?(q.style.backgroundImage="url("+n+")",q.style.backgroundRepeat="no-repeat",q.style.backgroundPosition="center",q.style.backgroundSize="24px 24px"):this.createThumb(v,m,g,q,b,d,c,f,e);var u=new mxRectangle(0,0,f,e);1{{parseShapeType(shape)}} {{shape.layerName}} - diff --git a/CSETWebNg/src/app/assessment/diagram/diagram-inventory/shapes/shapes.component.ts b/CSETWebNg/src/app/assessment/diagram/diagram-inventory/shapes/shapes.component.ts index 0804932b73..706d968994 100644 --- a/CSETWebNg/src/app/assessment/diagram/diagram-inventory/shapes/shapes.component.ts +++ b/CSETWebNg/src/app/assessment/diagram/diagram-inventory/shapes/shapes.component.ts @@ -104,12 +104,14 @@ export class ShapesComponent implements OnInit { }); } - changeShapeToComponent(event: any, id: string) { + changeShapeToComponent(event: any, shape: any) { let type = event.target.value; + let id = shape.id; + let label = shape.value ? shape.value : ''; this.diagramSvc.getDiagramComponents().subscribe( (x: any) => { - let label = this.diagramSvc.applyComponentSuffix(type, x); + label = label == '' ? this.diagramSvc.applyComponentSuffix(type, x) : label; this.diagramSvc.changeShapeToComponent(type, id, label).subscribe( (compList: any) =>