Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Fx.Scroll on window + Fx.Scroll using #scrollTo and #scrollThere

#211

Maybe you could make Fx.Scroll work on window too, by effectively running it on document.body? window.scrollTo is nice and all, but for smooth scrolling you currently have to run Fx.Scroll on the document.body (or just document.body.scroll()) instead of running it on window too. I don't think there should be a difference in use between normal scrolling and smooth scrolling in this case. I think we should be able to use window.scrollTo and window.scroll (or some other name as I think window.scroll already exists) for normal scrolling and smooth scrolling respectively.

Another thing concerning scrolling:
Maybe we could pass some Fx properties to Element#scrollTo, Element#scrollThere and window.scrollTo (using Fx.Scroll on document.body as described above) too, so we can use the same methods for both normal and smooth scrolling, while effectively running the Fx.Scroll code in the latter case. Just like we can do with Element#show and Element#hide, when providing an fx argument.

Reported by Douwe M. · March 1st, 2010 @ 11:29 PM

State: resolved
Milestone: 1.5.6 Release
Assigned to: nobody

Activity

  1. MadRabbit
  2. Douwe M.
  3. MadRabbit
    MadRabbit
    • State changed from new to resolved
    • Milestone cleared.

    Pushed the fix to github. Now you can do it in the following ways

    // using Fx.Scroll
    new Fx.Scroll(window).start({y: 200});
    
    // or passing additional fx options in the standard method
    window.scrollTo(0, 100, {duration: 'normal'});
    window.scrollTo({x:0, y:100}, {duration: 'normal'});
    
    // or the same for the Element#scrollThere
    element.scrollThere({duration: 'normal'});
    

    March 11th, 2010 @ 02:32 PM

  4. MadRabbit
    MadRabbit
    • Milestone set to 1.5.6 Release

    March 11th, 2010 @ 02:35 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.