Skip to content
Snippets Groups Projects
Commit ae9c51a5 authored by jojohoch's avatar jojohoch
Browse files

[player] Fix unnecessary scrollbars for image, button, and textarea

parent cb5cc962
No related branches found
No related tags found
No related merge requests found
...@@ -5,23 +5,28 @@ import { ButtonElement } from '../models/button-element'; ...@@ -5,23 +5,28 @@ import { ButtonElement } from '../models/button-element';
@Component({ @Component({
selector: 'app-button', selector: 'app-button',
template: ` template: `
<button *ngIf="!elementModel.imageSrc" mat-button <div [style.display]="'flex'"
(focusin)="onFocusin.emit()" [style.width.%]="100"
[style.width.%]="100" [style.height.%]="100">
[style.height.%]="100" <button *ngIf="!elementModel.imageSrc" mat-button
[style.background-color]="elementModel.backgroundColor" (focusin)="onFocusin.emit()"
[style.color]="elementModel.fontColor" [style.width.%]="100"
[style.font-family]="elementModel.font" [style.height.%]="100"
[style.font-size.px]="elementModel.fontSize" [style.background-color]="elementModel.backgroundColor"
[style.font-weight]="elementModel.bold ? 'bold' : ''" [style.color]="elementModel.fontColor"
[style.font-style]="elementModel.italic ? 'italic' : ''" [style.font-family]="elementModel.font"
[style.text-decoration]="elementModel.underline ? 'underline' : ''" [style.font-size.px]="elementModel.fontSize"
[style.border-radius.px]="elementModel.borderRadius"> [style.font-weight]="elementModel.bold ? 'bold' : ''"
{{elementModel.label}} [style.font-style]="elementModel.italic ? 'italic' : ''"
</button> [style.text-decoration]="elementModel.underline ? 'underline' : ''"
<input *ngIf="elementModel.imageSrc" type="image" [src]="elementModel.imageSrc" [style.border-radius.px]="elementModel.borderRadius">
[width]="elementModel.width" [height]="elementModel.height" {{elementModel.label}}
[style.object-fit]="'scale-down'" alt="Bild nicht gefunden"> </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 { export class ButtonComponent extends ElementComponent {
......
...@@ -5,7 +5,8 @@ import { ImageElement } from '../models/image-element'; ...@@ -5,7 +5,8 @@ import { ImageElement } from '../models/image-element';
@Component({ @Component({
selector: 'app-image', selector: 'app-image',
template: ` template: `
<div [style.height.%]="100" <div [style.display]="'flex'"
[style.height.%]="100"
[style.width.%]="100"> [style.width.%]="100">
<img [src]="elementModel.src | safeResourceUrl" <img [src]="elementModel.src | safeResourceUrl"
alt="Image Placeholder" alt="Image Placeholder"
......
...@@ -24,6 +24,6 @@ export class TextAreaElement extends InputElement implements FontElement, Surfac ...@@ -24,6 +24,6 @@ export class TextAreaElement extends InputElement implements FontElement, Surfac
Object.assign(this, initSurfaceElement()); Object.assign(this, initSurfaceElement());
this.backgroundColor = 'transparent'; this.backgroundColor = 'transparent';
this.height = 120; this.height = 132;
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment