Jump to content
Search Community

The opposite of TweenLite.get() / Parsing css properties to get the current x/y position

pault 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

I was wondering if there would be a way to parse the css properties of an element. With TweenLite.set() we can set for example a new x value. It would be great if we could somehow read that value back again  without parsing the matrix manually and doing this in a different way for IE8<.

 

So when we first do TweenLite.set($myElement, {css:{x:100}});

It would be great if we then could do: TweenLite.get($myElement,"x"), which would then return 100 again.

 

I found myself in the need for this already a couple of times, but haven't been able to find an easy solution for this. Is there anything like this available that I have overseen? If not, then I think this would be a great addition to the API.

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