scrollarea overflow detection and scroll to click

  • Hi,

    given this:

    1) A parent of 500px wide (or 100% but with a onresize event) and a scrollarea of a 1000px. How could you show left/right or top/down arrows to scroll the area with a mousedown.
    2) How would you move the area, just alter the x? or apply every inc(1) to scrolltocenter

    3rd question: How can you center on the thumbnail the user clicked. I tried onclick=" layer[scrollarea].scrolltocenter(x,0); " on the thumbnail, but it just scrolled back to the start Solved this, had to do get(x)

  • At least, if there is thumb overflow left or right to have the selected/current thumb centered.


    cheers,

    Dorin

    you can do this by setting the scrollarea align to center and then add a onclick="layer[scrollarea].scrolltocenter(get(x), get(y))" to the thumbnail. Clicking the thumbnail, will then scroll the area so the clicked thumbnail is centered.

  • Hi,

    1) A parent of 500px wide (or 100% but with a onresize event) and a scrollarea of a 1000px. How could you show left/right or top/down arrows to scroll the area with a mousedown.

    I will try to provide an example with buttons for scrolling in the next release.


    2) How would you move the area, just alter the x? or apply every inc(1) to scrolltocenter

    Yes, the area can be moved by modifying the x, y settings (set or tween) or by using the 'setcenter' or 'scrolltocenter' actions.

    Best regards,
    Klaus

  • Hello Everyone,

    I've been building a content slider using the scrollarea plugin. Although I have come up with something which you can see here http://www.eyecandyvi.com/scroll/block.html I am experiencing one very strange issue and hopefully one solvable problem. aside from all the programming logic that could clean up the action I think I'm 90% there.

    1.) I do my development on an iMac and when I test on a PC things don't work the same. For example if you click on the learn more button on a PC the close x and even the container holding the text content are not aligned. If I change it on the PC then it isn't aligned properly on the mac. Both using Firefox.

    2.) more than two slides on the content slider creates an obvious problem. when you swipe on the image, it slides to the left and overshoots the center. I've been able to set it up with arrows but would like it to stop with the swipe action. I've tried to understand the examples presented in this thread but I may be missing something obvious. If this is not possible then is there a way to prevent the swipe action?

    I've also reviewed the scrollbox example included in Klaus' package. I encounter the same problems I'm experiencing in number 1.

    Hopefully someone can help.

    Thanks,

    Robert

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!