From 4121a52652385d373adb9149edcf544ebb1320a8 Mon Sep 17 00:00:00 2001
From: rhenck <richard.henck@iqb.hu-berlin.de>
Date: Wed, 12 Jan 2022 21:21:54 +0100
Subject: [PATCH] Refactor simple dropList element

Now manages height and width by itself. So no overlay div is needed in
the cloze component.
---
 .../ui-elements/drop-list-simple/drop-list-simple.component.ts | 2 ++
 .../common/ui-elements/drop-list-simple/drop-list-simple.ts    | 3 +--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/projects/common/ui-elements/drop-list-simple/drop-list-simple.component.ts b/projects/common/ui-elements/drop-list-simple/drop-list-simple.component.ts
index c73ae3e6a..80baa100e 100644
--- a/projects/common/ui-elements/drop-list-simple/drop-list-simple.component.ts
+++ b/projects/common/ui-elements/drop-list-simple/drop-list-simple.component.ts
@@ -14,6 +14,8 @@ import { DragNDropValueObject } from '../../models/uI-element';
       <!-- Border width is a workaround to enable/disable the Material cdk-drop-list-receiving-->
       <!-- class style.-->
       <div class="list"
+           [style.height.px]="elementModel.height"
+           [style.width.px]="elementModel.width"
            [class.dropList-highlight]="elementModel.highlightReceivingDropList"
            [style.border-color]="elementModel.highlightReceivingDropListColor"
            [style.border-width.px]="elementModel.highlightReceivingDropList ? 2 : 0"
diff --git a/projects/common/ui-elements/drop-list-simple/drop-list-simple.ts b/projects/common/ui-elements/drop-list-simple/drop-list-simple.ts
index 41e4cd411..c47501ca8 100644
--- a/projects/common/ui-elements/drop-list-simple/drop-list-simple.ts
+++ b/projects/common/ui-elements/drop-list-simple/drop-list-simple.ts
@@ -2,12 +2,11 @@ import {
   FontElement,
   FontProperties,
   InputElement,
-  PositionedElement, PositionProperties,
   SurfaceElement,
   SurfaceProperties,
   UIElement
 } from '../../models/uI-element';
-import { initFontElement, initPositionedElement, initSurfaceElement } from '../../util/unit-interface-initializer';
+import { initFontElement, initSurfaceElement } from '../../util/unit-interface-initializer';
 
 export class DropListSimpleElement extends InputElement implements FontElement, SurfaceElement {
   connectedTo: string[] = [];
-- 
GitLab