From e07e9affd147d6641245be65c1a5019d049822a5 Mon Sep 17 00:00:00 2001 From: rhenck <richard.henck@iqb.hu-berlin.de> Date: Wed, 15 Dec 2021 22:06:48 +0100 Subject: [PATCH] [editor] Allow negative values for z-index and margins --- .../element-sizing-properties.component.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/projects/editor/src/app/components/unit-view/page-view/properties-panel/element-sizing-properties.component.ts b/projects/editor/src/app/components/unit-view/page-view/properties-panel/element-sizing-properties.component.ts index 6319880d5..ef7b49b9d 100644 --- a/projects/editor/src/app/components/unit-view/page-view/properties-panel/element-sizing-properties.component.ts +++ b/projects/editor/src/app/components/unit-view/page-view/properties-panel/element-sizing-properties.component.ts @@ -116,7 +116,7 @@ import { UIElement } from '../../../../../../../common/models/uI-element'; <div class="input-group"> <mat-form-field class="centered-form-field small-input"> <mat-label>{{'propertiesPanel.top' | translate }}</mat-label> - <input matInput type="number" #marginTop="ngModel" min="0" + <input matInput type="number" #marginTop="ngModel" [ngModel]="combinedProperties.marginTop" (ngModelChange)="updateModel.emit( { property: 'marginTop', value: $event, isInputValid: marginTop.valid && $event !== null })"> @@ -124,14 +124,14 @@ import { UIElement } from '../../../../../../../common/models/uI-element'; <div fxLayoutAlign="row"> <mat-form-field class="small-input"> <mat-label>{{'propertiesPanel.left' | translate }}</mat-label> - <input matInput type="number" #marginLeft="ngModel" min="0" + <input matInput type="number" #marginLeft="ngModel" [ngModel]="combinedProperties.marginLeft" (ngModelChange)="updateModel.emit( { property: 'marginLeft', value: $event, isInputValid: marginLeft.valid && $event !== null })"> </mat-form-field> <mat-form-field class="right-form-field small-input"> <mat-label>{{'propertiesPanel.right' | translate }}</mat-label> - <input matInput type="number" #marginRight="ngModel" min="0" + <input matInput type="number" #marginRight="ngModel" [ngModel]="combinedProperties.marginRight" (ngModelChange)="updateModel.emit( { property: 'marginRight', @@ -141,7 +141,7 @@ import { UIElement } from '../../../../../../../common/models/uI-element'; </div> <mat-form-field class="centered-form-field small-input"> <mat-label>{{'propertiesPanel.bottom' | translate }}</mat-label> - <input matInput type="number" #marginBottom="ngModel" min="0" + <input matInput type="number" #marginBottom="ngModel" [ngModel]="combinedProperties.marginBottom" (ngModelChange)="updateModel.emit( { property: 'marginBottom', @@ -153,7 +153,7 @@ import { UIElement } from '../../../../../../../common/models/uI-element'; <mat-form-field *ngIf="combinedProperties.positionProps" appearance="fill"> <mat-label>{{'propertiesPanel.zIndex' | translate }}</mat-label> - <input matInput type="number" #zIndex="ngModel" min="0" + <input matInput type="number" #zIndex="ngModel" [ngModel]="combinedProperties.zIndex" (ngModelChange)="updateModel.emit({ property: 'zIndex', value: $event, -- GitLab