mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-06-12 03:58:17 +00:00
Modified the stroke dasharray value for creating Dash Dot, Dash Dot Dot border style
This commit is contained in:
@ -37,7 +37,7 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div mat-dialog-actions>
|
<div mat-dialog-actions align="end">
|
||||||
<button mat-button (click)="onNoClick()" color="accent">Cancel</button>
|
<button mat-button (click)="onNoClick()" color="accent">Cancel</button>
|
||||||
<button mat-button (click)="onYesClick()" tabindex="2" mat-raised-button color="primary">Apply</button>
|
<button mat-button (click)="onYesClick()" tabindex="2" mat-raised-button color="primary">Apply</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -28,10 +28,10 @@ export class StyleEditorDialogComponent implements OnInit {
|
|||||||
formGroup: FormGroup;
|
formGroup: FormGroup;
|
||||||
borderTypes = [
|
borderTypes = [
|
||||||
{ value: 'none', name: 'Solid' },
|
{ value: 'none', name: 'Solid' },
|
||||||
|
{ value: '15 3', name: 'Dash' },
|
||||||
{ value: '5', name: 'Dot' },
|
{ value: '5', name: 'Dot' },
|
||||||
{ value: '15', name: 'Dash' },
|
{ value: '15 2 7 2', name: 'Dash Dot' },
|
||||||
{ value: '15 5', name: 'Dash Dot' },
|
{ value: '15 2 7 2 7 2', name: 'Dash Dot Dot' },
|
||||||
{ value: '15 5 5', name: 'Dash Dot Dot' },
|
|
||||||
{ value: '', name: 'No border' },
|
{ value: '', name: 'No border' },
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -79,7 +79,8 @@ export class StyleEditorDialogComponent implements OnInit {
|
|||||||
if (this.element.stroke_dasharray == '') {
|
if (this.element.stroke_dasharray == '') {
|
||||||
this.element.stroke_width = 0;
|
this.element.stroke_width = 0;
|
||||||
} else {
|
} else {
|
||||||
this.element.stroke_width = this.formGroup.get('borderWidth').value === 0 ? 2 : this.formGroup.get('borderWidth').value
|
this.element.stroke_width =
|
||||||
|
this.formGroup.get('borderWidth').value === 0 ? 2 : this.formGroup.get('borderWidth').value;
|
||||||
}
|
}
|
||||||
this.drawing.rotation = this.formGroup.get('rotation').value;
|
this.drawing.rotation = this.formGroup.get('rotation').value;
|
||||||
|
|
||||||
@ -90,8 +91,9 @@ export class StyleEditorDialogComponent implements OnInit {
|
|||||||
this.drawing.element.stroke_width = this.element.stroke_width;
|
this.drawing.element.stroke_width = this.element.stroke_width;
|
||||||
} else if (this.drawing.element instanceof LineElement) {
|
} else if (this.drawing.element instanceof LineElement) {
|
||||||
this.drawing.element.stroke = this.element.stroke;
|
this.drawing.element.stroke = this.element.stroke;
|
||||||
this.drawing.element.stroke_dasharray = this.element.stroke_dasharray === '' ? 'none': this.element.stroke_dasharray ;
|
this.drawing.element.stroke_dasharray =
|
||||||
this.drawing.element.stroke_width = this.element.stroke_width === 0 ? 2 :this.element.stroke_width;
|
this.element.stroke_dasharray === '' ? 'none' : this.element.stroke_dasharray;
|
||||||
|
this.drawing.element.stroke_width = this.element.stroke_width === 0 ? 2 : this.element.stroke_width;
|
||||||
}
|
}
|
||||||
let mapDrawing = this.drawingToMapDrawingConverter.convert(this.drawing);
|
let mapDrawing = this.drawingToMapDrawingConverter.convert(this.drawing);
|
||||||
mapDrawing.element = this.drawing.element;
|
mapDrawing.element = this.drawing.element;
|
||||||
|
Reference in New Issue
Block a user