Download & Extend

Wrong buttons on negative scroll

Project:jCarousel
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Hi,

I made a jCarousel views and I needed a negative scroll (-1) value. I found the buttons (prev. and next) are not prepared for negative scroll numbers.
Simulate:
1 - create a carousel
2 - set scroll to -1
3 - scroll to an end (first or last)
4 - wrong button will be disabled and backward moving is unable
I made a patch (sorry about the ugly structure, but I hadn't enough time to make a nicer one) which solves the problem. I tested back and forth and it worked for me.

Please, consider to include this feature if you find it useful more than one people.
But if I missed something please let me know.

Best regards,
Peter

AttachmentSize
jcarousel_negative_scroll.patch2.25 KB

Comments

#1

Hi,

I played a bit with the module and found another side effect. Although the buttons with the patch above are fine, autoscrolling has an issue when the carousel is loaded. For example:
1 - set the item number to 20
2 - set offset to 20 (begin at the end of the line)
3 - set scroll to -1 (step from end to beginning by 1)
This case the line won't start, because animate() notices jcarousel reached the end of the line. So I modify one extra condition in the animate() function and uploaded the fresh patch.
I think it is rather quick&dirty than elegant (sorry about that), again:(.

Regards,
Peter

AttachmentSize
jcarousel_negative_scroll_2.patch 2.78 KB

#2

Status:active» closed (fixed)

The 2.x version has updated code for the jcarousel.jquery.js library. If this problem still exists, you should collaborate with the JS library author and then we can update the Drupal module to use the next version of the library.

nobody click here