Skip to content
Snippets Groups Projects
Commit 9e3c0613 authored by rhenck's avatar rhenck
Browse files

Set all elements width and heigth to 100%

This is in preparation for dynamic layouting.
The actual dimensions are set by the overlay component which differs but 
is existent for both editor and player.
parent 14c3a09a
No related branches found
No related tags found
No related merge requests found
...@@ -6,8 +6,8 @@ import { ButtonElement } from '../unit'; ...@@ -6,8 +6,8 @@ import { ButtonElement } from '../unit';
selector: 'app-button', selector: 'app-button',
template: ` template: `
<button mat-button <button mat-button
[style.width.px]="elementModel.width" [style.width.%]="100"
[style.height.px]="elementModel.height" [style.height.%]="100"
[style.background-color]="elementModel.backgroundColor" [style.background-color]="elementModel.backgroundColor"
[style.color]="elementModel.fontColor" [style.color]="elementModel.fontColor"
[style.font-family]="elementModel.font" [style.font-family]="elementModel.font"
......
...@@ -7,8 +7,8 @@ import { FormElementComponent } from '../form-element-component.directive'; ...@@ -7,8 +7,8 @@ import { FormElementComponent } from '../form-element-component.directive';
template: ` template: `
<mat-checkbox #checkbox class="example-margin" <mat-checkbox #checkbox class="example-margin"
[formControl]="elementFormControl" [formControl]="elementFormControl"
[style.width.px]="elementModel.width" [style.width.%]="100"
[style.height.px]="elementModel.height" [style.height.%]="100"
[style.background-color]="elementModel.backgroundColor" [style.background-color]="elementModel.backgroundColor"
[style.color]="elementModel.fontColor" [style.color]="elementModel.fontColor"
[style.font-family]="elementModel.font" [style.font-family]="elementModel.font"
......
...@@ -6,8 +6,8 @@ import { FormElementComponent } from '../form-element-component.directive'; ...@@ -6,8 +6,8 @@ import { FormElementComponent } from '../form-element-component.directive';
selector: 'app-dropdown', selector: 'app-dropdown',
template: ` template: `
<mat-form-field appearance="fill" <mat-form-field appearance="fill"
[style.width.px]="elementModel.width" [style.width.%]="100"
[style.height.px]="elementModel.height" [style.height.%]="100"
[style.background-color]="elementModel.backgroundColor"> [style.background-color]="elementModel.backgroundColor">
<mat-label [style.color]="elementModel.fontColor" <mat-label [style.color]="elementModel.fontColor"
[style.font-family]="elementModel.font" [style.font-family]="elementModel.font"
......
...@@ -5,8 +5,8 @@ import { FormElementComponent } from '../form-element-component.directive'; ...@@ -5,8 +5,8 @@ import { FormElementComponent } from '../form-element-component.directive';
@Component({ @Component({
selector: 'app-number-field', selector: 'app-number-field',
template: ` template: `
<mat-form-field [style.width.px]="elementModel.width" <mat-form-field [style.width.%]="100"
[style.height.px]="elementModel.height" [style.height.%]="100"
[style.background-color]="elementModel.backgroundColor" [style.background-color]="elementModel.backgroundColor"
[style.color]="elementModel.fontColor" [style.color]="elementModel.fontColor"
[style.font-family]="elementModel.font" [style.font-family]="elementModel.font"
......
...@@ -5,8 +5,8 @@ import { FormElementComponent } from '../form-element-component.directive'; ...@@ -5,8 +5,8 @@ import { FormElementComponent } from '../form-element-component.directive';
@Component({ @Component({
selector: 'app-radio-button-group', selector: 'app-radio-button-group',
template: ` template: `
<div [style.width.px]="elementModel.width" <div [style.width.%]="100"
[style.height.px]="elementModel.height" [style.height.%]="100"
[style.background-color]="elementModel.backgroundColor" [style.background-color]="elementModel.backgroundColor"
[style.color]="elementModel.fontColor" [style.color]="elementModel.fontColor"
[style.font-family]="elementModel.font" [style.font-family]="elementModel.font"
......
...@@ -5,20 +5,20 @@ import { FormElementComponent } from '../form-element-component.directive'; ...@@ -5,20 +5,20 @@ import { FormElementComponent } from '../form-element-component.directive';
@Component({ @Component({
selector: 'app-text-area', selector: 'app-text-area',
template: ` template: `
<mat-form-field [style.width.px]="elementModel.width" <mat-form-field [style.width.%]="100"
[style.height.px]="elementModel.height" [style.height.%]="100"
[style.background-color]="elementModel.backgroundColor" [style.background-color]="elementModel.backgroundColor"
[style.color]="elementModel.fontColor" [style.color]="elementModel.fontColor"
[style.font-family]="elementModel.font" [style.font-family]="elementModel.font"
[style.font-size.px]="elementModel.fontSize" [style.font-size.px]="elementModel.fontSize"
[style.font-weight]="elementModel.bold ? 'bold' : ''" [style.font-weight]="elementModel.bold ? 'bold' : ''"
[style.font-style]="elementModel.italic ? 'italic' : ''" [style.font-style]="elementModel.italic ? 'italic' : ''"
[style.text-decoration]="elementModel.underline ? 'underline' : ''"> [style.text-decoration]="elementModel.underline ? 'underline' : ''">
<textarea matInput [formControl]="elementFormControl" <textarea matInput [formControl]="elementFormControl"
placeholder="{{elementModel.label}}" placeholder="{{elementModel.label}}"
[style.resize]="elementModel.resizeEnabled ? 'both' : 'none'"> [style.resize]="elementModel.resizeEnabled ? 'both' : 'none'">
</textarea> </textarea>
</mat-form-field> </mat-form-field>
` `
}) })
export class TextAreaComponent extends FormElementComponent { export class TextAreaComponent extends FormElementComponent {
......
...@@ -5,8 +5,8 @@ import { FormElementComponent } from '../form-element-component.directive'; ...@@ -5,8 +5,8 @@ import { FormElementComponent } from '../form-element-component.directive';
@Component({ @Component({
selector: 'app-text-field', selector: 'app-text-field',
template: ` template: `
<mat-form-field [style.width.px]="elementModel.width" <mat-form-field [style.width.%]="100"
[style.height.px]="elementModel.height" [style.height.%]="100"
[style.background-color]="elementModel.backgroundColor" [style.background-color]="elementModel.backgroundColor"
[style.color]="elementModel.fontColor" [style.color]="elementModel.fontColor"
[style.font-family]="elementModel.font" [style.font-family]="elementModel.font"
......
...@@ -5,18 +5,18 @@ import { ElementComponent } from '../element-component.directive'; ...@@ -5,18 +5,18 @@ import { ElementComponent } from '../element-component.directive';
@Component({ @Component({
selector: 'app-text', selector: 'app-text',
template: ` template: `
<div [style.width.px]="elementModel.width" <div [style.width.%]="100"
[style.height.px]="elementModel.height" [style.height.%]="100"
[style.background-color]="elementModel.backgroundColor" [style.background-color]="elementModel.backgroundColor"
[style.color]="elementModel.fontColor" [style.color]="elementModel.fontColor"
[style.font-family]="elementModel.font" [style.font-family]="elementModel.font"
[style.font-size.px]="elementModel.fontSize" [style.font-size.px]="elementModel.fontSize"
[style.font-weight]="elementModel.bold ? 'bold' : ''" [style.font-weight]="elementModel.bold ? 'bold' : ''"
[style.font-style]="elementModel.italic ? 'italic' : ''" [style.font-style]="elementModel.italic ? 'italic' : ''"
[style.text-decoration]="elementModel.underline ? 'underline' : ''" [style.text-decoration]="elementModel.underline ? 'underline' : ''"
[style.white-space]="'pre-wrap'"> [style.white-space]="'pre-wrap'">
{{elementModel.text}} {{elementModel.text}}
</div> </div>
` `
}) })
export class TextComponent extends ElementComponent { export class TextComponent extends ElementComponent {
......
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