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

Unable to stop non-queued animation #368

Closed
andywhite37 opened this issue Nov 26, 2014 · 6 comments
Closed

Unable to stop non-queued animation #368

andywhite37 opened this issue Nov 26, 2014 · 6 comments

Comments

@andywhite37
Copy link

I'm not sure if this is an issue, or expected behavior, but it seems you can't stop an animation that was started with queue: false. I read through the documentation and searched through the issues, but didn't see anything that mentioned this. I tried just using stop by itself, and also with the true parameter to clear the queue.

http://codepen.io/andywhite37/pen/NPqYPw/

Thanks for your work on this project.

@ydaniv
Copy link
Contributor

ydaniv commented Nov 26, 2014

Didn't check the source yet, but the docs do say that you can't use reverse with custom/parallel queues. Since the stop command is based on similar mechanisms I think this is by design and needs to be added to the docs.

@andywhite37
Copy link
Author

Yeah, I thought that might be the case. It would be really nice to be able to stop non-queued animations though - there are certain use cases where you have to run parallel animations, and not being able to stop them creates some challenges (my other issue #369 - parallel animations for scroll x and y).

@ydaniv
Copy link
Contributor

ydaniv commented Nov 26, 2014

Yes, I can certainly see where this is critical, especially in panning, e.g. maps.

@julianshapiro
Copy link
Owner

It would be an easy tweak to make "stop" stop queue: false calls. Will think about it upon the upcoming release.

@ydaniv
Copy link
Contributor

ydaniv commented Nov 26, 2014

👍

@julianshapiro
Copy link
Owner

New behavior beginning with tonight's release:

- options === true --> stop current default queue calls (and queue:false calls), including remaining queued ones.
- options === undefined --> stop current queue:"" call and all queue:false calls.
- options === false --> stop only queue:false calls.
- options === "custom" --> stop current queue:"custom" call, including remaining queued ones (there is no functionality to only clear the currently-running queue:"custom" call). 

Rycochet pushed a commit that referenced this issue Aug 3, 2020
Closes #293. You can now pass a `tween` property for creating arbitrary
tween callbacks via the `progress` function. Refer to
VelocityJS.org/#progress for more information.

Created e/p/o shorthands for elements/properties/options syntactic
sugar arguments syntax. Refer to VelocityJS.org/#arguments to learn
more.

Closes #368. The stop command now has increased targeting for `queue:
false` animations, and is more robust. Refer to VelocityJS.org/#stop
for more.

Closes #396. Easing functions are now passed `opts` and `tweenDelta` so
that custom easing functions can have greater access to animation
parameters. Refer to VelocityJS.org/#easing for more.

Closes #343. Differently-colored border colors don’t throw off
`border-color` animation anymore.

Closes #321. Implements “finish” feature for prematurely stopping
current animations, but having them reach their end values and trigger
their corresponding callbacks. Refer to VelocityJS.org/#finish for more.

Closes #352. Prevents Firefox from throwing an error when animating an
SVG element that isn’t being visually rendered.

Closes #317. Array compacting now happens within ticks to ensure loops
don’t cause arrays to bloat. Thanks so much, @marvelousNinja!

Closes #324. HTML tables and tbody’s now have their proper display
values set by Velocity. Thanks so much to @dtreiter and @okrad!

Closes #371. Looping `backgroundPositionX/Y` to 100% causes a proper
incrementing loop instead of alternation.
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

3 participants