Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Won't autoScroll or mouseScroll to the right #37

Closed
smcgovern opened this issue Sep 17, 2012 · 11 comments
Closed

Won't autoScroll or mouseScroll to the right #37

smcgovern opened this issue Sep 17, 2012 · 11 comments

Comments

@smcgovern
Copy link

I am trying to have my gallery autoscroll to the right as well as have it be able to mousescroll but it only seems to work in one direction. I'm sure its my implementation of it but I cannot get to the bottom of it.

http://modworldwide.com/10rsq/gallery_test/

@tkahn
Copy link
Owner

tkahn commented Sep 18, 2012

Hi!

First try setting the new camel-case name for the autoScrolling option:

autoScrollingMode: "onStart"

But apart from that I think you might be experiencing a problem that seems to occur in Chrome (perhaps other browsers as well?) when there's no margin in the browser window. See issue #9. On that page there's a suggestion for a work-around as well.

What happens is that the browser triggers a mouseover event in the top left corner (0 x 0) of the browser window when you have some form of autoscroll activated, manualContinuosScrolling set to true. And if there's no margin on the page, the left hot spot will be in that position and it will in turn start scrolling left.

I'm still trying to solve this mystery. I need to know if it's a bug in the plugin, the browser or a combination of the two. From my point of view the browser shouldn't tigger a mouseover event at all since the mouse is nowhere near that position.

Try this and report back here if it works out for you.

@smcgovern
Copy link
Author

I tried applying camel casing as well as adding margins of 1px as issue #9 suggests. Sadly it didn't affect scrolling at all.

@tkahn
Copy link
Owner

tkahn commented Sep 18, 2012

I found another syntax error. All the options that control the auto scrolling should have names with "scrolling" not "scroll":

autoScrollingMode
autoScrollingDirection
autoScrollingStep
autoScrollingInterval

In your code I saw that three of the names with "scroll":

autoScrollingMode: "onStart",
autoScrollDirection: "right",
autoScrollInterval: 60,
autoScrollStep: 2,

Hope it works this time!

@smcgovern
Copy link
Author

You had me hopeful, but no luck :(. Hovering over the hotSpots seems to be the only thing that works, even if I have other stuff enabled.

mousewheelScrolling: "allDirections"

If I have this on, I can mousewheel scroll but it only goes to the right. Weird issues! Wish wasn't happening cause this plugin looks so nice.

@tkahn
Copy link
Owner

tkahn commented Sep 20, 2012

This is so wierd! If you download the code here on GitHub, copy in your exact options, like this:

$(document).ready(function () {

    $("div#makeMeScrollable").smoothDivScroll({
        autoScrollingMode: "onStart",
        autoScrollingDirection: "endlessLoopRight",
        autoScrollingInterval: 60,
        autoScrollingStep: 2,
        manualContinuousScrolling: true,
        hotSpotScrolling: true,
        hotSpotScrollingStep: 6
    });
});

...and run the example page (index.html) you'll see that it scrolls just like it should.

You have quite a lot of stuff going on on your page and even though it seems like good code there might be something happening when it's all running together?

Some further tips:

  • Use the callbacks to see if something is happening that shouldn't be happening.
  • Use the non-minified code and log out diagnostics to the console.

/Thomas

@kopmanis
Copy link

I'm finding that the mixed-case endlessLoopRight doesn't work, but all-lowercase, "endlessloopright" does. I have the 1.2 version of the plugin.

@tkahn
Copy link
Owner

tkahn commented Feb 14, 2013

Yes, the name of the parameter changed to endlessLoopRight in version 1.3 so if you are using the older version of the plugin I think endlessloopright is the synax in version 1.2.

I made a general note about this in the Version history when I released version 1.3, but I agree that it can be hard to see.

Did this solve your problem?

@kopmanis
Copy link

Yepper...I'd found some anomalies and got it working. Great tool, though!

On Thu, Feb 14, 2013 at 11:16 AM, Thomas Kahn notifications@github.comwrote:

Yes, the name of the parameter changed to endlessLoopRight in version
1.3 so if you are using the older version of the plugin I think *
endlessloopright* is the synax in version 1.2.

I made a general note about this in the Version historyhttp://www.smoothdivscroll.com/versionHistory.htmlwhen I released version 1.3, but I agree that it can be hard to see.

Did this solve your problem?


Reply to this email directly or view it on GitHubhttps://github.com//issues/37#issuecomment-13560749.

Jeff Kopmanis
Monroe Big Band: http://monroebigband.com
Soul Kitchen: http://soulkitchencooks.com
Orange Can Astronomy http://orange-can.blogspot.com
Pickle Reviews http://pickle-review.blogspot.com
Saxessories http://saxessories.blogspot.com
** Go Green and leave this email on the Screen! **

@tkahn
Copy link
Owner

tkahn commented Feb 15, 2013

Sorry for the poor documentation regarding switching between different versions, but I'm glad you sorted it out!

@tkahn tkahn closed this as completed Feb 15, 2013
@hew
Copy link

hew commented Jun 25, 2015

I suffered with the same bug. I found that any time the right hover-able element extended beyond the width of the viewport, the script would break.

Here is an illustration. The top line is the viewport width (which is the same as the parent div). Notice that when there is enough space on the right side of the hover-able element, things work fine. If it extends beyond the parent's width, it seems to break.

Illustration

If you just play with the width of that div, and then centre it, it should work fine.

#makeMeScrollable { width: 99%; margin: 0 auto; }

@hew
Copy link

hew commented Jun 25, 2015

Additionally, the above would seem to indicate that the issue is not so much with the right side, or right scrolling. Rather, the issue is with margins. I think if the #makeMeScrollable div was aligned to the right hand side, the leftward scrolling would likely break.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants