From f7f4f77f4e1dff413f73a606347a21d465940751 Mon Sep 17 00:00:00 2001 From: rhenck <richard.henck@iqb.hu-berlin.de> Date: Mon, 8 Nov 2021 18:12:57 +0100 Subject: [PATCH] Add styling to DropList and fix sizing The width/height of 90% are a preliminary workaround to not produce overflow with the border. A better solution would be good. --- .../compound-elements/drop-list.component.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/projects/common/element-components/compound-elements/drop-list.component.ts b/projects/common/element-components/compound-elements/drop-list.component.ts index ddce3b9b1..a608e2d8c 100644 --- a/projects/common/element-components/compound-elements/drop-list.component.ts +++ b/projects/common/element-components/compound-elements/drop-list.component.ts @@ -7,7 +7,18 @@ import { FormElementComponent } from '../../form-element-component.directive'; @Component({ selector: 'app-drop-list', template: ` - <div class="list" cdkDropList + <!-- TODO width/height 90 to not produce overflow. find better solution. --> + <div class="list" + [style.width.%]="90" + [style.height.%]="90" + [style.color]="elementModel.fontColor" + [style.font-family]="elementModel.font" + [style.font-size.px]="elementModel.fontSize" + [style.font-weight]="elementModel.bold ? 'bold' : ''" + [style.font-style]="elementModel.italic ? 'italic' : ''" + [style.text-decoration]="elementModel.underline ? 'underline' : ''" + [style.backgroundColor]="elementModel.backgroundColor" + cdkDropList [id]="elementModel.id" [cdkDropListData]="this" [cdkDropListConnectedTo]="elementModel.connectedTo" -- GitLab