From 5b8c171ea96818c012cd758bec2057d61873396e Mon Sep 17 00:00:00 2001 From: Martin Leblanc <m26lebla@uwaterloo.ca> Date: Thu, 13 Mar 2025 14:32:16 -0400 Subject: [PATCH] ISTWCMS-5650: Add js to match previous logic for carousel ff numItems --- .../04-components/facts-and-figures/facts-and-figures.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/patterns/04-components/facts-and-figures/facts-and-figures.js b/src/patterns/04-components/facts-and-figures/facts-and-figures.js index 2a787640..90901837 100644 --- a/src/patterns/04-components/facts-and-figures/facts-and-figures.js +++ b/src/patterns/04-components/facts-and-figures/facts-and-figures.js @@ -20,13 +20,15 @@ pageDots: true, prevNextButtons: false, wrapAround: false, + contain: true, groupCells: function () { var width = $(window).width(); if (width <= 600) { return 1; } - else if (width <= 1024) { - return Math.min(2, numOfItems); + else if (width <= 1000) { + return numOfItems <= 2 ? (numOfItems - 1 > 0) + ? numOfItems - 1 : 1 : 2; } else { return numOfItems; -- GitLab