mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2024-12-21 13:57:48 +00:00
Merge branch '2.2' into master-3.0
# Conflicts: # package.json # src/app/components/project-map/drawings-editors/style-editor/style-editor.component.ts
This commit is contained in:
commit
3df22bd177
@ -37,6 +37,29 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="form-field" *ngIf="element.width !== undefined">
|
||||
<input
|
||||
matInput
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
placeholder="Width"
|
||||
min="0"
|
||||
type="number"
|
||||
[(ngModel)]="element.width"
|
||||
/>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="form-field" *ngIf="element.height !== undefined">
|
||||
<input
|
||||
matInput
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
placeholder="Height"
|
||||
min="0"
|
||||
type="number"
|
||||
[(ngModel)]="element.height"
|
||||
/>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
<mat-form-field class="form-field" *ngIf="element.rx !== undefined">
|
||||
<input
|
||||
matInput
|
||||
|
@ -59,6 +59,8 @@ 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.width = this.drawing.element.width;
|
||||
this.element.height = this.drawing.element.height;
|
||||
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' ;
|
||||
@ -95,6 +97,8 @@ export class StyleEditorDialogComponent implements OnInit {
|
||||
|
||||
if (this.drawing.element instanceof RectElement || this.drawing.element instanceof EllipseElement) {
|
||||
this.drawing.element.fill = this.element.fill;
|
||||
this.drawing.element.width = this.element.width;
|
||||
this.drawing.element.height = this.element.height;
|
||||
this.drawing.element.stroke = this.element.stroke ?? "#000000";
|
||||
this.drawing.element.stroke_dasharray = this.element.stroke_dasharray;
|
||||
this.drawing.element.stroke_width = this.element.stroke_width;
|
||||
@ -133,6 +137,8 @@ export class StyleEditorDialogComponent implements OnInit {
|
||||
|
||||
export class ElementData {
|
||||
fill: string;
|
||||
width: number;
|
||||
height: number;
|
||||
stroke: string;
|
||||
stroke_width: number;
|
||||
stroke_dasharray: string;
|
||||
|
Loading…
Reference in New Issue
Block a user