Jump to content
Search Community

Search the Community

Showing results for tags 'unit'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • GreenSock Forums
    • GSAP
    • Banner Animation
    • Jobs & Freelance
  • Flash / ActionScript Archive
    • GSAP (Flash)
    • Loading (Flash)
    • TransformManager (Flash)

Product Groups

  • Club GreenSock
  • TransformManager
  • Supercharge

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Personal Website


Twitter


CodePen


Company Website


Location


Interests

Found 1 result

  1. Hello, As you can see in the reduce test case, if I tween the width of a div from no value to '100vw', the new value is set to '100vw'. var div2 = document.getElementById('div2'); TweenMax.set(div2, {height: '100vw', onComplete:function(){ div2.innerHTML = div2.style.height; // 100vw }}); But if the value was already set in css (with the same unit), then the new one is calculate in px : #div { height: 20vw; } var div = document.getElementById('div'); TweenMax.set(div, {height: '100vw', onComplete:function(){ div.innerHTML = div.style.height; // ex: 1920px }}); Is it by design ? Can I force the value to be set in the wanted unit ? In my real world case, I tween the value this way TweenMax.to('.skill', 1, {height: '4vw', width: '16vw'); I understand the need to use pixel for the tween calcul so I was hoping to be able to do this this way to re-set my value in viewport unit : TweenMax.to('.skill', 1, {height: '4vw', width: '16vw', onComplete: function(){ TweenMax.set('.skill', {height: '4vw', width: '16vw'}); }); But as the test case shows, it doesn't seems to work this way either. Thanks for your time
×
×
  • Create New...