From 20bd0733f27ccbcc35d3fdf8420b25ce095034a2 Mon Sep 17 00:00:00 2001 From: grossmj Date: Mon, 29 Aug 2022 19:23:48 +0200 Subject: [PATCH] Change 'Dash Dot' and 'Dash Dot Dot' border styles --- src/app/cartography/helpers/qt-dasharray-fixer.ts | 4 ++-- .../style-editor/style-editor.component.ts | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/cartography/helpers/qt-dasharray-fixer.ts b/src/app/cartography/helpers/qt-dasharray-fixer.ts index 127887ef..95bb8226 100644 --- a/src/app/cartography/helpers/qt-dasharray-fixer.ts +++ b/src/app/cartography/helpers/qt-dasharray-fixer.ts @@ -9,8 +9,8 @@ export class QtDasharrayFixer { static MAPPING = { '25, 25': '10, 2', // Dash '5, 25': '4, 2', // Dot - '5, 25, 25': '5, 5, 1, 5', // Dash Dot - '25, 25, 5, 25, 5': '5, 2, 5, 2, 5', // Dash Dot Dot + '5, 25, 25': '12, 3, 5, 3', // Dash Dot + '25, 25, 5, 25, 5': '12, 3, 5, 3, 5, 3', // Dash Dot Dot }; public fix(dasharray: string): string { 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 c434476f..acc22895 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 @@ -31,8 +31,8 @@ export class StyleEditorDialogComponent implements OnInit { { qt: 'none', value: 'none', name: 'Solid' }, { qt: '10, 2', value: '25, 25', name: 'Dash' }, { qt: '4, 2', value: '5, 25', name: 'Dot' }, - { qt: '5, 5, 1, 5', value: '5, 25, 25', name: 'Dash Dot' }, - { qt: '5, 2, 5, 2, 5', value: '25, 25, 5, 25, 5', name: 'Dash Dot Dot' }, + { qt: '12, 3, 5, 3', value: '5, 25, 25', name: 'Dash Dot' }, + { qt: '12, 3, 5, 3, 5, 3', value: '25, 25, 5, 25, 5', name: 'Dash Dot Dot' }, { qt: '', value: '', name: 'No border' }, ]; @@ -59,7 +59,7 @@ export class StyleEditorDialogComponent implements OnInit { 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 = this.drawing.element.stroke; console.log(this.drawing.element.stroke_dasharray, this.drawing.element.stroke_width) this.element.stroke_dasharray = (this.drawing.element.stroke_dasharray == undefined && this.drawing.element.stroke_width == undefined ) ? '': this.drawing.element.stroke_dasharray ?? 'none' ; this.element.stroke_width = this.drawing.element.stroke_width; @@ -97,7 +97,7 @@ export class StyleEditorDialogComponent implements OnInit { if (this.element.stroke_dasharray != '') { this.drawing.element.stroke = this.element.stroke ?? "#000000"; this.drawing.element.stroke_dasharray = this.element.stroke_dasharray === '' ? 'none' : this.element.stroke_dasharray; - this.drawing.element.stroke_width = this.element.stroke_width === 0 ? 2 : this.element.stroke_width; + this.drawing.element.stroke_width = this.element.stroke_width === 0 ? 2 : this.element.stroke_width; } else { this.toasterService.warning(`No border style line element not supported`); }