On theme/infiniteCarousel.js file:
When we have float result on $wrapper.innerWidth() / singleWidth (Example : 5.5), we should take floor value and not ceil.

Actually, if $wrapper.innerWidth() / singleWidth == 5.5, visible = Math.ceil(5.5) = 6
This means we display 6 elements. It's wrong, we display 5.5 (or less) elements. One thing is sure, 6th element is not full displayed, so we should have visible = 5 to be sure to display 6th element first next page.

So to have this result, we should use Math.floor() instead of Math.ceil()

Patch in next comment

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

GoZ’s picture

Status: Active » Needs review
FileSize
957 bytes

Here is the patch

GoZ’s picture

Here is the patch

*edit* double post due to browser error

kscheirer’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

  • Manuel Garcia committed 5e69420 on 7.x-1.x authored by GoZ
    Issue #2044143 by GoZ: Math.ceil should be floor on infiniteCarousel
    
Manuel Garcia’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

Thanks, committed. Sorry for taking so long!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.