Closed theiliad closed 3 years ago
Per the README, emphasis added:
If the name is a transition instance, the returned transition has the same id and name as the specified transition. If a transition with the same id already exists on a selected element, the existing transition is returned for that element. Otherwise, the timing of the returned transition is inherited from the existing transition of the same id on the nearest ancestor of each selected element. Thus, this method can be used to synchronize a transition across multiple selections, or to re-select a transition for specific elements and modify its configuration.
If you’re seeing this error, it’s either because (1) the transition has expired (not evident from your code snippet, but you didn’t share a complete working example so it’s impossible to say) or (2) the “blah blah” elements you are selecting are not descendant elements of the transition t.
(This happens in 3.0 because of #59; in earlier versions, it would silently ignore the t argument when the transition was not found.)
@mbostock I'm usually good w reading the d3 docs and figuring stuff out, however I still don't understand what could be happening.
Here's how I use transitions:
I've got a factory: https://github.com/carbon-design-system/carbon-charts/blob/8c27e54319d8aabcccdfcee211acc0c669572cef/packages/core/src/services/essentials/transitions.ts#L20-L39
And I use it like so: https://github.com/carbon-design-system/carbon-charts/blob/8c27e54319d8aabcccdfcee211acc0c669572cef/packages/core/src/components/axes/grid.ts#L100-L103
That's all working in 5.x, now trying to upgrade to 6.x or 7.x I keep seeing transition 1 not found
I might've misread your docs, but as a naive fix I tried adding an incrementing ID in my factory
and I still get the same error.
Could you pls clarify what needs to change?
I still feel like I'm not understanding how transitions are supposed to be working
Is this better?
bumping
In case anyone else is having these kinds of issues. I ended up using .call()
to handle my transitions
Hi I think there might be a bug in 3.0 when doing
I keep seeing the error
Error: transition 1 not found
I'm using a factory for transitions, and it's been working in previous versions, but updating to 3.0 keeps giving me this error