Skip to content

Commit

Permalink
fix bad commit from pager fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Wafford committed Jan 24, 2015
1 parent 29a166f commit d5581ff
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions src/jquery.bxslider.js
Original file line number Diff line number Diff line change
Expand Up @@ -1303,26 +1303,21 @@
*/
el.redrawSlider = function(){
// resize all children in ratio to new screen size
slider.children.add(el.find('.bx-clone')).width(getSlideWidth());
slider.children.add(el.find('.bx-clone')).outerWidth(getSlideWidth());
// adjust the height
slider.viewport.css('height', getViewportHeight());
// update the slide position
if(!slider.settings.ticker){ setSlidePosition(); }
if(!slider.settings.ticker) { setSlidePosition(); }
// if active.last was true before the screen resize, we want
// to keep it last no matter what screen size we end on
if(slider.active.last){ slider.active.index = getPagerQty() - 1; }
if (slider.active.last) { slider.active.index = getPagerQty() - 1; }
// if the active index (page) no longer exists due to the resize, simply set the index as last
if(slider.active.index >= getPagerQty()){ slider.active.last = true; }
// if there is a default pager populate it
if(slider.settings.pager){
if (slider.active.index >= getPagerQty()) { slider.active.last = true; }
// if a pager is being displayed and a custom pager is not being used, update it
if(slider.settings.pager && !slider.settings.pagerCustom){
populatePager();
updatePagerActive(slider.active.index);
}
// if there is a custom pager activate it
if(slider.settings.pagerCustom){
appendPager();
updatePagerActive(slider.active.index);
}
};

/**
Expand Down

0 comments on commit d5581ff

Please sign in to comment.