Fx.Scroll toElementEdge / toElementCenter don't work as expected #1016

meleyal opened this Issue Aug 23, 2011 · 4 comments


None yet

3 participants

meleyal commented Aug 23, 2011 edited

This line in both methods prevents animating if the current x,y are the same as the target x,y:

if (to.x != scroll.x || to.y != scroll.y) this.start(to.x, to.y);

However, as start() is never called, this also prevents the onComplete callback or .chain functions from firing.
(This is different to how toElement works, which will always fire the callback, even if the coordinates remain the same.)

As a user of these methods, I would expect the onComplete callback to always fire, even if no scrolling actually happens.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/359967-fx-scroll-toelementedge-toelementcenter-don-t-work-as-expected?utm_campaign=plugin&utm_content=tracker%2F22069&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F22069&utm_medium=issues&utm_source=github).
arian commented Aug 23, 2011

you're probably right that we should be consistent here. Could you fix it (it's super easy via the github webinterface (fork and edit file button)) and send a pull request.

meleyal commented Aug 23, 2011

added #1017

meleyal commented May 25, 2012

Any progress on this?


Related #1160 & #1317

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment