-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
transition delay update #1116
transition delay update #1116
Conversation
Just realized this is failing. Fixing now. |
@mbustosorg wrote :
|
return selections; | ||
dc.transition = function (selections, duration, delay, callback, name) { | ||
if (dc.disableTransitions || duration <= 0 || duration === undefined || delay <= 0 || delay === undefined) { | ||
return selections; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this enforce a delay? I would think a delay of zero is valid and should still invoke the transition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I'll update it.
Hrrmmm, the build system can be finicky, especially on Travis... and we haven't even gotten to the Sauce Labs cross platform tests. :-S Do you mean it's also failing on your local machine? I'm not at the computer today but I can give it a shot tomorrow. |
It's behaving the same way on my machine. Using --force shows all the tests succeeding and running it in the browser shows the same (all success). I'm unable to figure out what the Error from Phantom JS is. |
In that case, it's likely that one of our development dependencies has changed. This is all built on shifting sands. I'll take a look tomorrow. |
@@ -108,21 +108,26 @@ describe('dc.core', function () { | |||
duration: function () { | |||
return this; | |||
} | |||
delay: function () { | |||
return this; | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's simply a syntax error in the source here
You can run It will also point out that you're using tabs when the style here is to use spaces. (There's a commit hook to check this stuff but I'm not sure if it always gets installed automatically.) Finally, before I merge this I'd like to see if it's possible to make Otherwise, this seems like a nice general-purpose addition and a pretty clear way to open up another of d3's parameters. Thanks! |
Ok! Thanks for the hint. Tests passing now and I've fixed the formatting issues. |
Thanks @mbustosorg! Merged for 2.0 beta 33. |
in preparation for #1116 this was a confusing parameter, invoked when it was decided that there would be a transition. since we used it in exactly the case where we were calling attrTween, and we already had to check that in another place, seems clearer just to check that every time. (it was also going to make it impossible to add an int/function-typed parameter)
Adding the ability to specify the transition delay in addition to transition duration. This allows you to create some more interesting transition flows by adjusting when the transitions would start.
This creates a random 0-1 second delay which can give the transition another dimension.