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

prepostredraw #806

Closed
gordonwoodhull opened this issue Dec 20, 2014 · 8 comments
Closed

prepostredraw #806

gordonwoodhull opened this issue Dec 20, 2014 · 8 comments

Comments

@gordonwoodhull
Copy link
Contributor

Most of the time when people resort to a renderlet, they want something that fires immediately, not after the transitions. But the post* events and the renderlets deliberately fire after all transitions

_chart._activateRenderlets = function (event) {

Without breaking any existing code, we could maybe add more events that really trigger directly after render/redraw, with no delay, and then ppl could modify the DOM before anything hits the screen, even if they have transitions enabled.

@gordonwoodhull gordonwoodhull added this to the v2.1 milestone Dec 20, 2014
@gordonwoodhull
Copy link
Contributor Author

Conversation that spawned this: https://groups.google.com/d/msgid/dc-js-user-group/744A7AF6-ED55-4821-B028-413F6D932D1E%40woodhull.com?utm_medium=email&utm_source=footer

But this has come up a million times before, it is the top gripe about renderlets.

@gordonwoodhull
Copy link
Contributor Author

Thanks @amergin for the link to #610.

@r4j4h
Copy link
Contributor

r4j4h commented Dec 31, 2014

+1 to having a postRedrawBeforeTransitionStart and keeping the current as postRedrawAfterTransitionsEnd for backwards compat.

@mr23
Copy link
Contributor

mr23 commented Dec 31, 2014

+1

On December 31, 2014 11:48:10 AM CST, Jasmine Hegman notifications@github.com wrote:

+1 to having a postRedrawBeforeTransitionStart and keeping the current
as postRedrawAfterTransitionsEnd for backwards compat.


Reply to this email directly or view it on GitHub:
#806 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.

@gordonwoodhull
Copy link
Contributor Author

#833 should help move this along - renderlet is just like any event now.

@gordonwoodhull
Copy link
Contributor Author

How about "pretransition"?

@r4j4h
Copy link
Contributor

r4j4h commented May 1, 2015

+1 for "pretransition", very succinct!

@gordonwoodhull gordonwoodhull modified the milestones: v2.0, v2.1 Jun 1, 2015
@gordonwoodhull
Copy link
Contributor Author

Releasing this in 2.0.0 beta 11 since it shouldn't interfere with any existing functionality.

Please try it out!

P.S. To add a transition on any added elements that runs along with the transitions on built-in elements, add it like this:

chart.on('pretransition', function(chart) {
    chart.select(...).append(...)
       // create stuff
       .transition().duration(chart.transitionDuration())
       // change stuff

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

No branches or pull requests

3 participants