Jump to content
Search Community

Nested SVGs: Inconsistent behaviour

Dipscom test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Oh mighty CodeGod! Hear this prayers and spare a drop of your infinite knowledge!

 

This lowly being has tried to be more than what is worth. This unworthy one attempted to reach a higher level of consciousness and thought he could come up with something wise. But as fate will have it, it was not to be.

 

One can tween SVGs, one can tween SVG elements but one cannot tween a root SVG nested within a parent SVG.

 

Please, mighty one, show me a sign!

 

*grovel*, *grovel*, *grovel*...

 

ps: Editing a Pen in a mobile device is quite painful.

See the Pen 11a819dd170f2f0079307289f60cefa5 by dipscom (@dipscom) on CodePen

  • Haha 1
Link to comment
Share on other sites

11 minutes ago, OSUblake said:

Did you read the manual?

https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/transform#Elements

 

The transform attribute for SVG elements is for SVG 2 onwards.

 

Ah! No, I did not do my homework correctly. Now it makes sense. Shame though.

 

10 minutes ago, mikel said:

Hi @Dipscom,

 

Not every circle is a circle ...

 


TweenMax.to('.circle, circle', 1, {scale:0})

 

Best regards

Mikel

 

Hey Mikel, thanks for the input. I should have named things differently. Mea culpa. But the behaviour I am trying to illustrate here is you can't transform a root SVG when nesting it inside another SVG. It's not really about scaling the circles themselves.

  • Like 4
Link to comment
Share on other sites

2 hours ago, OSUblake said:

 

Two things:

1) I'm sure the intonation of the sentence is around the lines of: 'Real Men don't...'

2) Are you telling me that I've been sold a wolf wearing sheep clothing? Because I am convinced my partner is a woman and she does not as a matter of principle reads any manuals. Ever.

Link to comment
Share on other sites

We've got it here via Netflix as well. I saw a couple of episodes already. Unfortunately, there's only one telly here and it's a rather political/diplomatic event picking what to watch when we're at home. And I am only allowed a certain amount of 'SCIENCE' in the TV time...

 

:roll:

 

Maybe I should stop chatting away here and go help someone. Hum... Let me sleep a bit first. Tomorrow. Beginners, beware!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...