The carosel appears to be engaged as soon as I have enough images (thumbnail) to fill the thumbnail row. This gives the appearance of extra images, but simple slides to the same set of images again and again. Could do with being updated so it has to be shown images + 1 before its engaged?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

johnv’s picture

This would require some calculation using $dimensions['slides']['width'] and $dimensions['thumbs']['width'] in

  if($num_of_images > 1){
    drupal_add_js($modulepath . '/theme/infiniteCarousel.js');
    drupal_add_js($modulepath . '/theme/galleryformatter.js');
  }

something like

  if($num_of_images * $dimensions['thumbs']['width'] > $dimensions['slides']['width'] ) { ... }

There will be some rounding effect because of the theme-spaces, though.

Manuel Garcia’s picture

Make sure that the number of images you want per page fit ENTIRELY on the width space available, INCLUDING paddings etc. Use firebug wich is handy to see the box model.

The infiniteCarousel will make those calculations for you, and it should work fine.

johnv’s picture

Manuel, I am not sure what you mean. Are you saying that
- it should already work,
- or that we need a patch according to #1,
- or that it can be solved in custom css/ code (if so, how?) ?

Manuel Garcia’s picture

Version: 7.x-1.0 » 7.x-1.x-dev

Nevermind, I didn't actualy understand the issue apparently.

Indeed this is a bug, it's got a bit too much padding making the infinite carrousel think there are more.

Please test the patch attached.

Manuel Garcia’s picture

Status: Active » Needs review
FileSize
396 bytes
Manuel Garcia’s picture

Actauly this introduces a different problem, which is that after brosing the last img on a page, the next does not trigger the next page scroll.

So i've had to add a 'last' thumbnail class per page, and add a class for when the infinite carousel is not enabled so that the last thumbnail doesnt get pushed to the next line.

It's kinda hard to explain, these are tricky issues...

Do test the patch attached =)

johnv’s picture

Title: Carosel engages before extra images exist. » Carrousel engages before extra images exist.
johnv’s picture

It seems this is a duplicate of #1757614: Previous/Next buttons should not appear with 4 images ?
Or: "the themer should make sure you can show 4 images on a row"

Manuel Garcia’s picture

We should probably re-test this issue see if its stil happening with the latest 7.x -

kscheirer’s picture

Status: Needs review » Postponed (maintainer needs more info)

Please test again with latest dev version.