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

stop command doesn't seem to handle queue param properly #262

Closed
SkidX opened this issue Aug 23, 2014 · 15 comments
Closed

stop command doesn't seem to handle queue param properly #262

SkidX opened this issue Aug 23, 2014 · 15 comments
Labels

Comments

@SkidX
Copy link

SkidX commented Aug 23, 2014

Hi,
If I have two concurrent tweens on the same target (obviously animating different CSS properties), for example:

$target.velocity({left: 200}, {duration: 1000, queue: 'a'}).dequeue('a');
$target.velocity({top: 300}, {duration: 2000, queue: 'b'}).dequeue('b');

then using stop command with the aim to halt only one of them does not seem to work:
$target.velocity('stop', 'a');
It halts all the queues, not only 'a'.

With jQuery native animate it works as expected, stopping only 'a' while the other tween continues its run.

@julianshapiro
Copy link
Owner

I'll have this fixed in the next 2-3 days. Thank you.

@SkidX
Copy link
Author

SkidX commented Aug 23, 2014

Thank you for fixing it :)

@julianshapiro
Copy link
Owner

Fixed. Stay tuned for the next release.

@julianshapiro
Copy link
Owner

Please test, confirm it works, and get back to me. Thank you so much!

@SkidX
Copy link
Author

SkidX commented Aug 23, 2014

I cannot do deep test right now (it's night here), but as far as I seen doing some quick tests it seems to work perfectly now. Thanks.

@SkidX
Copy link
Author

SkidX commented Aug 24, 2014

Sorry, too tired yesterday, I've done the wrong test.
It is not working as expected.
Check this to see
http://jsfiddle.net/hct1n31x/1/

@julianshapiro
Copy link
Owner

Your test had multiple problems, including using $test instead of $v for the stopping. But it's revealed another bug that i'll look into. http://jsfiddle.net/hct1n31x/2/

@SkidX
Copy link
Author

SkidX commented Aug 24, 2014

yeah, sorry, cut & paste mistake.

@julianshapiro
Copy link
Owner

Done. Please test, confirm it works, and get back to me. Thank you so much!

@SkidX
Copy link
Author

SkidX commented Aug 25, 2014

I've tested it locally and the bug seems solved now.

However I've noticed that now if you use a custom queue it does not put animation data in velocity.tweensContainer object inside element's data structure, it is null now, while it fills it properly if you stay on default queue.
Is this behavior needed or maybe is just a side effect?
I was relying on those data for doing a particular thing, so for me is a little bit troublesome now.

@julianshapiro
Copy link
Owner

Correct. If you see the new documentation on velocity's reverse command, you'll see a new change has been made: only the default effects queue affects the stored tweensContainer (which is used for reversal).

Hopefully you don't mind figuring out a way around that :)

@SkidX
Copy link
Author

SkidX commented Aug 25, 2014

ok.
So, please correct me if I'm wrong, only when using default queue it will benefit from cached values, while if I use custom queues (or no queues) it has to query the DOM in order to know start and end values of properties, right?

@julianshapiro
Copy link
Owner

That is correct. Great question. It's not impossible for me to allow for multiple cached value chains (one per queue), but custom queuing is uncommon so it's not a concern of mine at this time.

Sent from my phone

On Aug 25, 2014, at 10:01 AM, Federico Orrù notifications@github.com wrote:

ok.
So, please correct me if I'm wrong, only when using default queue it will benefit from cached values, while if I use custom queues (or no queues) it has to query the DOM in order to know start and end values of properties, right?


Reply to this email directly or view it on GitHub.

@SkidX
Copy link
Author

SkidX commented Aug 25, 2014

fair enough :)

Thanks for the fix and explanations.

@julianshapiro
Copy link
Owner

Any time

Sent from my phone

On Aug 25, 2014, at 10:15 AM, Federico Orrù notifications@github.com wrote:

fair enough :)

Thanks for the fix and explanations.


Reply to this email directly or view it on GitHub.

Rycochet pushed a commit that referenced this issue Aug 3, 2020
Dropped support for the easeBack and easeElastic easings. They are
rarely used, look stupid, and take up a bunch of lines.

Sped up bezier curve easing performance. Thanks, @gre.

The display option now gets browser-prefixed if necessary. This
inherently adds cross-browser support for the ‘flex’ value. Closes #257.

Fixed bug where slideDown/up left excess inline styles on elements.
Closes #260. cc @kpeatt, @scalvert.

Allow passing an empty string to `display` to remove the inline style
from the element. Closes #184.

Shimmed version of jQuery’s $.dequeue() now accepts a raw DOM element
*set* instead of just a single element.

You can now stop custom queues individually. Closes #262.
Rycochet pushed a commit that referenced this issue Aug 3, 2020
Apply `overflow: hidden` when using the slide commands. Closes #260.

Sequence (UI pack effect) options object no longer gets externally
modified by Velocity. Closes #265.

Fixed bug where tweens would jump when dequeuing custom queues. Closes
#262. (The reverse command now only applies to the default effects
queue; reverse cannot be used with custom queues or parallel queueing
(queue: false).)

Fixed unit conversion bug on the `x` property of SVG elements.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants