MOBILE-2903 menu: Show 5 items max on phones
parent
12d75f14b2
commit
8f0032bb7b
|
@ -178,6 +178,9 @@ export class CoreMainMenuProvider {
|
||||||
numElements = Math.floor(window.innerHeight / CoreMainMenuProvider.ITEM_MIN_WIDTH);
|
numElements = Math.floor(window.innerHeight / CoreMainMenuProvider.ITEM_MIN_WIDTH);
|
||||||
} else {
|
} else {
|
||||||
numElements = Math.floor(window.innerWidth / CoreMainMenuProvider.ITEM_MIN_WIDTH);
|
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.
|
// Set a mínimum elements to show and skip more button.
|
||||||
|
|
Loading…
Reference in New Issue