From 51d3b3de5176868254d81c554c1e6c6ad0b9d21f Mon Sep 17 00:00:00 2001
From: jojohoch <joachim.hoch@iqb.hu-berlin.de>
Date: Wed, 22 Sep 2021 09:32:58 +0200
Subject: [PATCH] [player] Fix problem with unnecessary scrollbars for text and
 section

* undo setting overflow hidden for sections
* set display of `ElementOverflow` to block
---
 projects/editor/src/app/UnitFactory.ts                          | 2 +-
 projects/player/src/app/components/page/page.component.html     | 2 +-
 .../player/src/app/components/section/section.component.html    | 2 ++
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/projects/editor/src/app/UnitFactory.ts b/projects/editor/src/app/UnitFactory.ts
index 086e341f1..2f8e043ed 100644
--- a/projects/editor/src/app/UnitFactory.ts
+++ b/projects/editor/src/app/UnitFactory.ts
@@ -97,7 +97,7 @@ export function createTextElement(): TextElement {
     ...createTextUIElement(),
     ...createSurfaceUIElement(),
     backgroundColor: 'transparent',
-    height: 74
+    height: 78
   };
 }
 
diff --git a/projects/player/src/app/components/page/page.component.html b/projects/player/src/app/components/page/page.component.html
index fb93e62c9..ad3c29be7 100644
--- a/projects/player/src/app/components/page/page.component.html
+++ b/projects/player/src/app/components/page/page.component.html
@@ -9,7 +9,7 @@
                [ngStyle]="{
                   position: 'relative',
                   display: 'block',
-                  overflow: section.dynamicPositioning ? 'hidden' : 'auto',
+                  overflow: 'auto',
                   width: '100%',
                   'background-color': section.backgroundColor,
                   'min-height': section.dynamicPositioning ? 'auto' : section.height + 'px'}">
diff --git a/projects/player/src/app/components/section/section.component.html b/projects/player/src/app/components/section/section.component.html
index 68747b62d..ebb8c8870 100644
--- a/projects/player/src/app/components/section/section.component.html
+++ b/projects/player/src/app/components/section/section.component.html
@@ -9,6 +9,7 @@
        [style.left.px]="element.xPosition"
        [style.top.px]="element.yPosition">
     <app-element-overlay
+        [style.display]="'block'"
         [elementModel]="element"
         [parentForm]="sectionForm"
         [parentArrayIndex]="i">
@@ -32,6 +33,7 @@
          [style.grid-row-start]="element.gridRowStart"
          [style.grid-row-end]="element.gridRowEnd">
       <app-element-overlay
+          [style.display]="'block'"
           [elementModel]="element"
           [parentForm]="sectionForm"
           [parentArrayIndex]="i">
-- 
GitLab