Jump to content
Search Community

TweenMax.set is setting wrong position

xpo_greensock@knorex.com 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

Hi xpo_greensock@knor,

 

It will be hard to troubleshoot without having the whole context in which the code is operating. Could you setup a simple demo in CodePen or JsFiddle? Or somewhere else that we are able to see the live code?

 

Having said that, if all you want is a border around the selected element, wouldn't it be simpler to just have a border set with a transparent color and then, on selection, you toggle the color to full black?

Link to comment
Share on other sites

Yeah, it's tough to troubleshoot blind but I bet you've got the move (Draggable?) altering the transforms (x/y or translate()) whereas you're basing the highlight's position on top/left which are totally different. Transforms don't affect top/left at all. The browser still reports them based on where the element is in the document flow, but transforms don't affect flow at all. Once we see a codepen demo, I'm sure it'll become clear. 

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