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

Add 30px default bottom-margin to likert and radio

parent 96e15a39
No related branches found
No related tags found
No related merge requests found
...@@ -37,8 +37,15 @@ export class LikertElement extends CompoundElement implements PositionedElement, ...@@ -37,8 +37,15 @@ export class LikertElement extends CompoundElement implements PositionedElement,
this.height = serializedElement.height || 200; this.height = serializedElement.height || 200;
this.width = serializedElement.width || 250; this.width = serializedElement.width || 250;
if (serializedElement.marginBottom !== undefined) {
this.positionProps.marginBottom = serializedElement.marginBottom;
} else if (serializedElement.positionProps?.marginBottom !== undefined) {
this.positionProps.marginBottom = serializedElement.positionProps.marginBottom;
} else {
this.positionProps.marginBottom = 30;
}
this.surfaceProps.backgroundColor = this.surfaceProps.backgroundColor =
(serializedElement as unknown as SurfaceElement).surfaceProps.backgroundColor as string || (serializedElement as unknown as SurfaceElement).surfaceProps?.backgroundColor as string ||
serializedElement.backgroundColor as string || serializedElement.backgroundColor as string ||
'transparent'; 'transparent';
} }
......
...@@ -26,6 +26,13 @@ export class RadioButtonGroupElement extends InputElement implements PositionedE ...@@ -26,6 +26,13 @@ export class RadioButtonGroupElement extends InputElement implements PositionedE
this.surfaceProps = initSurfaceElement(serializedElement); this.surfaceProps = initSurfaceElement(serializedElement);
this.height = serializedElement.height || 85; this.height = serializedElement.height || 85;
if (serializedElement.marginBottom !== undefined) {
this.positionProps.marginBottom = serializedElement.marginBottom;
} else if (serializedElement.positionProps?.marginBottom !== undefined) {
this.positionProps.marginBottom = serializedElement.positionProps.marginBottom;
} else {
this.positionProps.marginBottom = 30;
}
this.surfaceProps.backgroundColor = this.surfaceProps.backgroundColor =
serializedElement.surfaceProps?.backgroundColor as string || serializedElement.surfaceProps?.backgroundColor as string ||
serializedElement.backgroundColor as string || serializedElement.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