Skip to content
This repository has been archived by the owner on May 10, 2018. It is now read-only.

Commit

Permalink
Merge pull request #46 from giuseppeaiello/master
Browse files Browse the repository at this point in the history
Round offset position to avoid antialiasing problem
  • Loading branch information
Julien Bouquillon committed Sep 2, 2013
2 parents 4675a95 + c941ea2 commit 42e4425
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/directives/rn-carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ angular.module('angular-carousel')
window.addEventListener('orientationchange', resize);
// when window is resized (responsive design)
window.addEventListener('resize', resize);

function resize () {
updateContainerWidth();
updateSlidePosition();
Expand Down Expand Up @@ -256,7 +256,7 @@ angular.module('angular-carousel')
/* trigger carousel position update */
skipAnimation = !!forceSkipAnimation || skipAnimation;
if (containerWidth===0) updateContainerWidth();
offset = scope.carouselCollection.getRelativeIndex() * -containerWidth;
offset = Math.round(scope.carouselCollection.getRelativeIndex() * -containerWidth);
if (skipAnimation===true) {
carousel.removeClass('rn-carousel-animate')
.addClass('rn-carousel-noanimate')
Expand Down

0 comments on commit 42e4425

Please sign in to comment.