diff --git a/src/app/cartography/converters/map/map-drawing-to-svg-converter.ts b/src/app/cartography/converters/map/map-drawing-to-svg-converter.ts index e5466483..9182870b 100644 --- a/src/app/cartography/converters/map/map-drawing-to-svg-converter.ts +++ b/src/app/cartography/converters/map/map-drawing-to-svg-converter.ts @@ -14,11 +14,11 @@ export class MapDrawingToSvgConverter implements Converter { let elem = ``; if (mapDrawing.element instanceof RectElement) { - elem = ``; + elem = ``; } else if (mapDrawing.element instanceof EllipseElement) { - elem = ``; + elem = ``; } else if (mapDrawing.element instanceof LineElement) { - elem = ``; + elem = ``; } else if (mapDrawing.element instanceof TextElement) { elem = `${mapDrawing.element.text}`; } else return ''; diff --git a/src/app/components/project-map/drawings-editors/style-editor/style-editor.component.html b/src/app/components/project-map/drawings-editors/style-editor/style-editor.component.html index be6c49aa..c62079a6 100644 --- a/src/app/components/project-map/drawings-editors/style-editor/style-editor.component.html +++ b/src/app/components/project-map/drawings-editors/style-editor/style-editor.component.html @@ -25,15 +25,10 @@ - - - + + + {{ type.name }} + diff --git a/src/app/components/project-map/drawings-editors/style-editor/style-editor.component.ts b/src/app/components/project-map/drawings-editors/style-editor/style-editor.component.ts index 583fe236..84830a2c 100644 --- a/src/app/components/project-map/drawings-editors/style-editor/style-editor.component.ts +++ b/src/app/components/project-map/drawings-editors/style-editor/style-editor.component.ts @@ -26,6 +26,12 @@ export class StyleEditorDialogComponent implements OnInit { drawing: Drawing; element: ElementData; formGroup: FormGroup; + borderTypes = [ + {value:"none",name:"Solid"}, + {value:"5",name:"Dash"}, + {value:"15",name:"Dot"}, + {value:"5 15",name:"Dash Dot"} + ]; constructor( public dialogRef: MatDialogRef, @@ -46,15 +52,14 @@ export class StyleEditorDialogComponent implements OnInit { ngOnInit() { this.element = new ElementData(); - if (this.drawing.element instanceof RectElement || this.drawing.element instanceof EllipseElement) { this.element.fill = this.drawing.element.fill; this.element.stroke = this.drawing.element.stroke; - this.element.stroke_dasharray = this.drawing.element.stroke_dasharray; + this.element.stroke_dasharray = this.drawing.element.stroke_dasharray ?? 'none' this.element.stroke_width = this.drawing.element.stroke_width; } else if (this.drawing.element instanceof LineElement) { this.element.stroke = this.drawing.element.stroke; - this.element.stroke_dasharray = this.drawing.element.stroke_dasharray; + this.element.stroke_dasharray = this.drawing.element.stroke_dasharray ?? 'none'; this.element.stroke_width = this.drawing.element.stroke_width; } @@ -82,10 +87,9 @@ export class StyleEditorDialogComponent implements OnInit { this.drawing.element.stroke_dasharray = this.element.stroke_dasharray; this.drawing.element.stroke_width = this.element.stroke_width; } - let mapDrawing = this.drawingToMapDrawingConverter.convert(this.drawing); mapDrawing.element = this.drawing.element; - + this.drawing.svg = this.mapDrawingToSvgConverter.convert(mapDrawing); this.drawingService.update(this.controller, this.drawing).subscribe((controllerDrawing: Drawing) => {