Fx.Scroll on window + Fx.Scroll using #scrollTo and #scrollThere
Reported by Douwe M. | March 1st, 2010 @ 11:29 PM | in 1.5.6 Release
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.
Comments and changes to this ticket
-
MadRabbit March 11th, 2010 @ 02:32 PM
- 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'});
-
MadRabbit March 11th, 2010 @ 02:35 PM
- Milestone set to 1.5.6 Release
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.