From 4e3ca4eec925dddb35337f0b12901edf8f1b5e07 Mon Sep 17 00:00:00 2001 From: Henriette Dinger Date: Tue, 20 Nov 2018 14:40:44 +0100 Subject: [PATCH] Limit the max width the main menu can get --- .../src/app/components/resizer/main-menu-toggle.service.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/src/app/components/resizer/main-menu-toggle.service.ts b/frontend/src/app/components/resizer/main-menu-toggle.service.ts index 2ef45d62ecb..d656de3bea1 100644 --- a/frontend/src/app/components/resizer/main-menu-toggle.service.ts +++ b/frontend/src/app/components/resizer/main-menu-toggle.service.ts @@ -144,6 +144,13 @@ export class MainMenuToggleService { } public saveWidth(width?:number):void { + // Leave a minimum amount of space for space fot the content + let maxMenuWidth = window.innerWidth - 520; + + if (width != undefined && width > maxMenuWidth) { + width = maxMenuWidth; + } + this.setWidth(width); window.OpenProject.guardedLocalStorage(this.localStorageKey, String(this.elementWidth)); this.setToggleTitle();