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

Reevaluation breaking when trying to use transition().each #95

Open
georules opened this issue Jun 7, 2013 · 3 comments
Open

Reevaluation breaking when trying to use transition().each #95

georules opened this issue Jun 7, 2013 · 3 comments

Comments

@georules
Copy link
Contributor

georules commented Jun 7, 2013

In this inlet:
http://tributary.io/inlet/5729452

// add / remove this to see reevalutaion break
/*.each("end", function(d) {
  d.transition().duration(2000)
  .attr("fill","red");
})*/

I am not sure if I am using transition.each([type, ]listener) correctly (https://github.com/mbostock/d3/wiki/Transitions#wiki-each) but regardless of that, if you add / remove the /* */ comment, tributary reevaluation stops working.

@enjalot
Copy link
Owner

enjalot commented Jun 9, 2013

Hopefully this kind of problem gets solved when I make all the display
stuff happen in it's own iframe. I think what's happening is that the end
callback gets used by a d3 timer internal to d3 (the way it keeps track of
transitions). So if there is an error in it somehow we don't hear about it
(it may be uncaught in d3's scope rather than ours). So after that the
transitions dont work.

the reason your example doesn't work is that you want to select the element
not the data point to transition it
http://tributary.io/inlet/5744054

On Fri, Jun 7, 2013 at 7:59 AM, Geoffery Miller [email protected]:

In this inlet:
http://tributary.io/inlet/5729452

// add / remove this to see reevalutaion break
/.each("end", function(d) {
d.transition().duration(2000)
.attr("fill","red");
})
/

I am not sure if I am using transition.each([type, ]listener) correctly (
https://github.com/mbostock/d3/wiki/Transitions#wiki-each) but regardless
of that, if you add / remove the /* */ comment, tributary reevaluation
stops working.


Reply to this email directly or view it on GitHubhttps://github.com//issues/95
.

Ian Johnson - 周彦
http://enja.org

@georules
Copy link
Contributor Author

I don't know what I was thinking, thanks for the fix on my code. Sorry if you already knew about this error on callback reevaluation bug ❤️

@enjalot
Copy link
Owner

enjalot commented Jun 10, 2013

I didn't know about it! Thanks. It helps confirm something I was thinking
with the force layout so thanks for reporting!
On Jun 9, 2013 7:41 PM, "Geoffery Miller" [email protected] wrote:

I don't know what I was thinking, thanks for the fix on my code. Sorry if
you already knew about this error on callback reevaluation bug [image:
❤️]


Reply to this email directly or view it on GitHubhttps://github.com//issues/95#issuecomment-19178854
.

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

2 participants