ember-animation / liquid-fire

Animations & transitions for ambitious Ember applications.
Other
1.14k stars 199 forks source link

Support SVG #238

Open cwarny opened 9 years ago

cwarny commented 9 years ago

It would be great if we could use Liquid Fire to handle animations for SVG. But since LF generates div elements, this does not seem possible. Maybe my suggestion is silly but is there any way we could support this by being able to insert, for instance, g elements instead of divs? That way, in Ember, we would have HTMLBars handling the data joins and DOM manipulations and LF handling the animations.

ef4 commented 9 years ago

This should be quite doable. It's just a question of making sure users can set the tagName on the generated liquid-child elements (and probably disable the liquid-container with the existing containerless mode, since it makes less sense in an svg context).

cwarny commented 9 years ago

Thanks for the reply! Is there a plan to support letting users set a tagName on the liquid-child elements? Actually it would be great to be able to set the tagName for both the liquid-child and liquid-container elements, since you can't capture the containerless elements in the transitions.js file, which is very useful.

sandstrom commented 9 years ago

I noticed https://github.com/Rich-Harris/ramjet, perhaps it could be integrated with liquid-fire, to handle certain SVG cases. Mostly a guess though, I don't know enough about the internals of either project to say for certain.

ef4 commented 9 years ago

ramjet is basically the same thing as liquid-fire's existing fly-to transition. If there are things it does better, I would be happy to integrate them.

cwarny commented 8 years ago

Any update on the possibility of defining both .liquid-container and .liquid-child's tagnames?