Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit a0c44c4

Browse files
author
vikasrohit
committed
Merge pull request #407 from appirio-tech/feature/responsive-carousel
SUP-2155, Dashboard: Subtracks should not limit to 5 in the carousel
2 parents 6f6cd4c + 204c7ee commit a0c44c4

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

app/directives/responsive-carousel/responsive-carousel.directive.js

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,22 @@
2929

3030
function init() {
3131
var width = $window.innerWidth;
32-
if(width > 1070) {
33-
// desktop
34-
buildCarouselSlide(6);
35-
} else if(width > 900) {
36-
// desktop
37-
buildCarouselSlide(5);
38-
} else if(width <= 900 && width > 768) {
39-
// tablet
40-
buildCarouselSlide(4);
32+
if(width >= 1350) {
33+
// desktop
34+
buildCarouselSlide(7);
35+
} else if(width >= 1180) {
36+
// desktop
37+
buildCarouselSlide(6);
38+
} else if(width >= 1010) {
39+
// desktop
40+
buildCarouselSlide(5);
41+
} else if(width < 1010 && width >= 768) {
42+
// tablet
43+
buildCarouselSlide(4);
4144
} else {
42-
// phone
43-
buildCarouselSlide(2);
45+
// we don't need to build carousel for mobile as we show horizontal scroll
46+
// phone
47+
buildCarouselSlide(2);
4448
}
4549
}
4650

0 commit comments

Comments
 (0)