Newer
Older
import { InputElement, UIElement } from './uI-element';
import { FontElement, SurfaceUIElement } from '../interfaces/UIElementInterfaces';
import { initFontElement, initSurfaceElement } from '../util/unit-interface-initializer';
export class RadioButtonGroupElement extends InputElement implements FontElement, SurfaceUIElement {
options: string[] = [];
alignment: 'vertical' | 'horizontal' = 'vertical';
strikeOtherOptions: boolean = false;
fontColor: string = 'black';
font: string = 'Roboto';
fontSize: number = 18;
bold: boolean = false;
italic: boolean = false;
underline: boolean = false;
backgroundColor: string = 'transparent';
constructor(serializedElement: UIElement) {
super(serializedElement);
Object.assign(this, initFontElement(serializedElement));
Object.assign(this, initSurfaceElement(serializedElement));
this.height = serializedElement.height || 85;
this.backgroundColor = serializedElement.backgroundColor as string || 'transparent';