Limit the max width the main menu can get

pull/6845/head
Henriette Dinger 6 years ago
parent 28c10ba9dd
commit 4e3ca4eec9
  1. 7
      frontend/src/app/components/resizer/main-menu-toggle.service.ts

@ -144,6 +144,13 @@ export class MainMenuToggleService {
} }
public saveWidth(width?:number):void { 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); this.setWidth(width);
window.OpenProject.guardedLocalStorage(this.localStorageKey, String(this.elementWidth)); window.OpenProject.guardedLocalStorage(this.localStorageKey, String(this.elementWidth));
this.setToggleTitle(); this.setToggleTitle();

Loading…
Cancel
Save