Skip to content
Snippets Groups Projects
Commit 5b90fa99 authored by rhenck's avatar rhenck
Browse files

Make InputElement labe optional and remove it from cloze children

Cloze elements are displayed inline and have no way to show a label.
parent 4121a526
No related branches found
No related tags found
No related merge requests found
......@@ -62,7 +62,7 @@ export abstract class UIElement {
}
export abstract class InputElement extends UIElement {
label: string;
label?: string;
value: InputElementValue;
required: boolean;
requiredWarnMessage: string;
......
......@@ -23,6 +23,8 @@ export class DropListSimpleElement extends InputElement implements FontElement,
this.fontProps = initFontElement(serializedElement);
this.surfaceProps = initSurfaceElement(serializedElement);
delete this.label;
this.value = serializedElement.value as string[] || [];
this.height = serializedElement.height || 100;
this.surfaceProps.backgroundColor =
......
......@@ -18,6 +18,8 @@ export class TextFieldSimpleElement extends InputElement implements FontElement,
this.fontProps = initFontElement(serializedElement);
this.surfaceProps = initSurfaceElement(serializedElement);
delete this.label;
this.height = serializedElement.height || 25;
}
}
......@@ -21,6 +21,8 @@ export class ToggleButtonElement extends InputElement implements FontElement, Su
this.fontProps = initFontElement(serializedElement);
this.surfaceProps = initSurfaceElement(serializedElement);
delete this.label;
this.height = serializedElement.height as number || 25;
this.surfaceProps.backgroundColor =
serializedElement.surfaceProps?.backgroundColor as string ||
......
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