Skip to content

Commit

Permalink
Merge pull request nolimits4web#936 from SchwarzeSonne/bugfix-toFixed
Browse files Browse the repository at this point in the history
bugfix-firefox-translate3d
  • Loading branch information
nolimits4web committed Sep 19, 2014
2 parents 0ca5e56 + 7292249 commit a585714
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/idangerous.swiper.js
Original file line number Diff line number Diff line change
Expand Up @@ -1769,11 +1769,11 @@ var Swiper = function (selector, params) {
if (!internal && params.loop) _this.fixLoop();
if (!internal && params.autoplay) _this.stopAutoplay(true);
_this.callPlugins('onSwipeNext');
var currentPosition = _this.getWrapperTranslate();
var currentPosition = _this.getWrapperTranslate().toFixed(2);
var newPosition = currentPosition;
if (params.slidesPerView === 'auto') {
for (var i = 0; i < _this.snapGrid.length; i++) {
if (-currentPosition >= _this.snapGrid[i] && -currentPosition < _this.snapGrid[i + 1]) {
if (-currentPosition >= _this.snapGrid[i].toFixed(2) && -currentPosition < _this.snapGrid[i + 1].toFixed(2)) {
newPosition = -_this.snapGrid[i + 1];
break;
}
Expand Down

0 comments on commit a585714

Please sign in to comment.