Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Dipscom

Nested SVGs: Inconsistent behaviour

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

Hi @Dipscom,

 

Not every circle is a circle ...

 

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

 

Best regards

Mikel

  • Like 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

8 minutes ago, Dipscom said:

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

 

Me either. I had to look that one up. :lol:

  • Like 2
  • Thanks 1
  • Haha 1
Link to comment
Share on other sites

6 hours ago, Dipscom said:

Ah! No, I did not do my homework correctly.

 

I admire that @Dipscom. Reading the manual should only be used as a last resort when overwhelming desperation has set in and the caffeine has run out. :D

  • Like 3
Link to comment
Share on other sites

Who reads manuals anyway?

 

That's why I come here and beg for knowledge from others.

 

:-D

  • Like 2
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

Well, it's not a law. Just observations. 

 

What I linked to is from the show Brain Games. You should check it out. Pretty interesting stuff. I know it's on Netflix here in the US.

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.
×