Jump to content
GreenSock

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

simple Tweenmax set - not crossbrowser ?

Recommended Posts

Hey guys,

 

my simple Tweenmax.set () is going on chrome and opera

but not on edge IE11 FF56

 

have checked three different ways - alway the same result.

 

can anyone point me the right direction ?

 

 

See the Pen mqdJvL?editors=1010 by mi_cky (@mi_cky) on CodePen

Link to comment
Share on other sites

I can't see where that wouldn't be cross-browser. Perhaps the DOM isn't ready by the time it's called where you are seeing an issue. Maybe try

 

See the Pen JOjYeZ by sgorneau (@sgorneau) on CodePen

 

Link to comment
Share on other sites

Hey Shaun,

 

Have looked your pen with edge ie11 FF56 - same result - the ".T_Range" has not the expected width. 

Link to comment
Share on other sites

You're setting an attribute. Please try it like this:

 

TweenMax.set (".T_Range", {attr:{ x: minrange, width: maxrange - minrange }});

 

Happy tweening.

:)

  • Like 3
Link to comment
Share on other sites

Hey Craig,

 

see your two cents :) thanks.

Do you know why Chrome and Opera do ignore the wrong code ?

 

i am curios - my code  change the x position but not the width.

 

your code generates an other position and the width

Link to comment
Share on other sites

Ah, @PointC! I completely ignored that this was a SVG attribute :) 

  • Like 1
Link to comment
Share on other sites

@mi_cky Because Chrome lets you get away with a lot of craziness sometimes, but just because it works now doesn't mean it will work in the next release. As the Good Sir @Jonathan will tell you, he tests in Firefox first because that follows the spec.

 

@Shaun Gorneau - it's Friday so that's completely understandable. :)

 

  • Like 1
Link to comment
Share on other sites

Hey Craig,

 

i am curios again - what i remember - have seen a lot of code with Tweenmax.set ()

but the attr: part i have not seen.

Just looking at the docs - no hint for use the - attr:

 

should i use the - attr: - always ?

 

ok - think i get it - there is a difference in handling css and svg ?

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