mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2024-12-21 05:53:06 +00:00
Allow edit height and width for rectangles and ellipses
This commit is contained in:
parent
a4f7db62ba
commit
d725363fe5
@ -42,6 +42,29 @@
|
|||||||
/>
|
/>
|
||||||
</mat-form-field>
|
</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">
|
<mat-form-field class="form-field" *ngIf="element.rx !== undefined">
|
||||||
<input
|
<input
|
||||||
matInput
|
matInput
|
||||||
|
@ -49,6 +49,8 @@ export class StyleEditorDialogComponent implements OnInit {
|
|||||||
|
|
||||||
if (this.drawing.element instanceof RectElement || this.drawing.element instanceof EllipseElement) {
|
if (this.drawing.element instanceof RectElement || this.drawing.element instanceof EllipseElement) {
|
||||||
this.element.fill = this.drawing.element.fill;
|
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;
|
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;
|
||||||
this.element.stroke_width = this.drawing.element.stroke_width;
|
this.element.stroke_width = this.drawing.element.stroke_width;
|
||||||
@ -79,6 +81,8 @@ export class StyleEditorDialogComponent implements OnInit {
|
|||||||
|
|
||||||
if (this.drawing.element instanceof RectElement || this.drawing.element instanceof EllipseElement) {
|
if (this.drawing.element instanceof RectElement || this.drawing.element instanceof EllipseElement) {
|
||||||
this.drawing.element.fill = this.element.fill;
|
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;
|
this.drawing.element.stroke = this.element.stroke;
|
||||||
this.drawing.element.stroke_dasharray = this.element.stroke_dasharray;
|
this.drawing.element.stroke_dasharray = this.element.stroke_dasharray;
|
||||||
this.drawing.element.stroke_width = this.element.stroke_width;
|
this.drawing.element.stroke_width = this.element.stroke_width;
|
||||||
@ -110,6 +114,8 @@ export class StyleEditorDialogComponent implements OnInit {
|
|||||||
|
|
||||||
export class ElementData {
|
export class ElementData {
|
||||||
fill: string;
|
fill: string;
|
||||||
|
width: number;
|
||||||
|
height: number;
|
||||||
stroke: string;
|
stroke: string;
|
||||||
stroke_width: number;
|
stroke_width: number;
|
||||||
stroke_dasharray: string;
|
stroke_dasharray: string;
|
||||||
|
Loading…
Reference in New Issue
Block a user