diff --git a/projects/common/element-components/button.component.ts b/projects/common/element-components/button.component.ts index 513f55f6ad99726f15749aa0ca49106e7205c264..f616ff0b58465775fc54f88d315b14c2f0acb6e6 100644 --- a/projects/common/element-components/button.component.ts +++ b/projects/common/element-components/button.component.ts @@ -5,23 +5,28 @@ import { ButtonElement } from '../models/button-element'; @Component({ selector: 'app-button', template: ` - <button *ngIf="!elementModel.imageSrc" mat-button - (focusin)="onFocusin.emit()" - [style.width.%]="100" - [style.height.%]="100" - [style.background-color]="elementModel.backgroundColor" - [style.color]="elementModel.fontColor" - [style.font-family]="elementModel.font" - [style.font-size.px]="elementModel.fontSize" - [style.font-weight]="elementModel.bold ? 'bold' : ''" - [style.font-style]="elementModel.italic ? 'italic' : ''" - [style.text-decoration]="elementModel.underline ? 'underline' : ''" - [style.border-radius.px]="elementModel.borderRadius"> - {{elementModel.label}} - </button> - <input *ngIf="elementModel.imageSrc" type="image" [src]="elementModel.imageSrc" - [width]="elementModel.width" [height]="elementModel.height" - [style.object-fit]="'scale-down'" alt="Bild nicht gefunden"> + <div [style.display]="'flex'" + [style.width.%]="100" + [style.height.%]="100"> + <button *ngIf="!elementModel.imageSrc" mat-button + (focusin)="onFocusin.emit()" + [style.width.%]="100" + [style.height.%]="100" + [style.background-color]="elementModel.backgroundColor" + [style.color]="elementModel.fontColor" + [style.font-family]="elementModel.font" + [style.font-size.px]="elementModel.fontSize" + [style.font-weight]="elementModel.bold ? 'bold' : ''" + [style.font-style]="elementModel.italic ? 'italic' : ''" + [style.text-decoration]="elementModel.underline ? 'underline' : ''" + [style.border-radius.px]="elementModel.borderRadius"> + {{elementModel.label}} + </button> + <input *ngIf="elementModel.imageSrc" type="image" [src]="elementModel.imageSrc" + [style.width.%]="100" + [style.height.%]="100" + [style.object-fit]="'contain'" alt="Bild nicht gefunden"> + </div> ` }) export class ButtonComponent extends ElementComponent { diff --git a/projects/common/element-components/image.component.ts b/projects/common/element-components/image.component.ts index c5732bd9f3885b5e935f08f26b56bd3e6490b457..4f3cac573a6f8a03159344042d8c7122116f466f 100644 --- a/projects/common/element-components/image.component.ts +++ b/projects/common/element-components/image.component.ts @@ -5,7 +5,8 @@ import { ImageElement } from '../models/image-element'; @Component({ selector: 'app-image', template: ` - <div [style.height.%]="100" + <div [style.display]="'flex'" + [style.height.%]="100" [style.width.%]="100"> <img [src]="elementModel.src | safeResourceUrl" alt="Image Placeholder" diff --git a/projects/common/models/text-area-element.ts b/projects/common/models/text-area-element.ts index d4b7651568d9c33cec0a63c4f77751f7918b4a2c..7005910b2a9293b94c0e272d153e253fbfa1c1e2 100644 --- a/projects/common/models/text-area-element.ts +++ b/projects/common/models/text-area-element.ts @@ -24,6 +24,6 @@ export class TextAreaElement extends InputElement implements FontElement, Surfac Object.assign(this, initSurfaceElement()); this.backgroundColor = 'transparent'; - this.height = 120; + this.height = 132; } }