-
rhenck authored
This way elements can handle their logic themselves without having to rely on outside utility classes. Also restructure files in common in a more logical way.
rhenck authoredThis way elements can handle their logic themselves without having to rely on outside utility classes. Also restructure files in common in a more logical way.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
radio-button-group-complex.ts 1.06 KiB
import { ElementFactory } from 'common/util/element.factory';
import {
BasicStyles,
InputElement,
PositionedUIElement,
PositionProperties,
TextImageLabel
} from 'common/models/elements/element';
import { Type } from '@angular/core';
import { ElementComponent } from 'common/directives/element-component.directive';
import { RadioGroupImagesComponent } from 'common/components/input-elements/radio-group-images.component';
export class RadioButtonGroupComplexElement extends InputElement implements PositionedUIElement {
columns: TextImageLabel[] = [];
position: PositionProperties;
styling: BasicStyles;
constructor(element: Partial<RadioButtonGroupComplexElement>) {
super({ height: 100, ...element });
Object.assign(this, element);
this.position = ElementFactory.initPositionProps({ marginBottom: 40, ...element.position });
this.styling = {
...ElementFactory.initStylingProps({ backgroundColor: 'transparent', ...element.styling })
};
}
getComponentFactory(): Type<ElementComponent> {
return RadioGroupImagesComponent;
}
}