Skip to content

Commit

Permalink
updated breakpoints to be greater than or equal to.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmonkey committed Feb 16, 2015
1 parent 035620d commit 08761aa
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ <h2>Slider with Thumbnail Pager</h2>
{"breakpoint": 360, "show": 1, "active": 1},
{"breakpoint": 580, "show": 2, "active": 1},
{"breakpoint": 720, "show": 3, "active": 2},
{"breakpoint": 860, "show": 4, "active": 2}
{"breakpoint": 860, "show": 5, "active": 3}
]'>
<li class="slide-1" data-fireslider-pager-description="One">1
<ul>
Expand Down
11 changes: 6 additions & 5 deletions build/js/fireSlider.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ var V = (window.jQuery) ? $.Velocity : Velocity;
slider: null,
slides: [],
timer: {},
windowTimer: {},
};

// Load element
Expand Down Expand Up @@ -216,12 +217,12 @@ var V = (window.jQuery) ? $.Velocity : Velocity;

if(fs.breakpoints.length > 0) {
var index = -1;
var min = -1;
var max = -1;
for(var i = 0; i < fs.breakpoints.length; i++) {
if(fs.breakpoints[i].breakpoint) {
if(fs.breakpoints[i].breakpoint >= fs.settings.windowWidth && (fs.breakpoints[i].breakpoint < min || min === -1)) {
if(fs.breakpoints[i].breakpoint <= fs.settings.windowWidth && (fs.breakpoints[i].breakpoint > max)) {
index = i;
min = fs.breakpoints[i].breakpoint;
max = fs.breakpoints[i].breakpoint;
}
}
}
Expand Down Expand Up @@ -681,8 +682,8 @@ var V = (window.jQuery) ? $.Velocity : Velocity;
}

fireSlider._utilities.listen(window, 'resize', function() {
refresh();
return false;
clearTimeout(fs.windowTimer);
fs.windowTimer = setTimeout(refresh, 10);
});
}

Expand Down
2 changes: 1 addition & 1 deletion dist/fireSlider.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/fireSlider.velocity.js

Large diffs are not rendered by default.

0 comments on commit 08761aa

Please sign in to comment.