From 8f0032bb7b38a4593e69fd460737e22c9b48d66a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Tue, 14 May 2019 09:52:49 +0200 Subject: [PATCH] MOBILE-2903 menu: Show 5 items max on phones --- src/core/mainmenu/providers/mainmenu.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/mainmenu/providers/mainmenu.ts b/src/core/mainmenu/providers/mainmenu.ts index 59eab0b7a..5f8fe59ed 100644 --- a/src/core/mainmenu/providers/mainmenu.ts +++ b/src/core/mainmenu/providers/mainmenu.ts @@ -178,6 +178,9 @@ export class CoreMainMenuProvider { numElements = Math.floor(window.innerHeight / CoreMainMenuProvider.ITEM_MIN_WIDTH); } else { numElements = Math.floor(window.innerWidth / CoreMainMenuProvider.ITEM_MIN_WIDTH); + + // Set a maximum elements to show and skip more button. + numElements = numElements >= 5 ? 5 : numElements; } // Set a mínimum elements to show and skip more button.