Jump to content
Search Community

The canvas coordinates of randomly placed composition CSS elements

Hector Haralambous test
Moderator Tag

Recommended Posts

Hey @Hector Haralambous,

 

Welcome to the GreenSock Forum.

 

Here an example to get the position of an element relative to the document / to the parent (see console).

 

Overlapping: This requires complex logic. Here is an example of how Draggable hitTest is used

(no way to get pixel-perfect hit testing for non-rectangular shapes): drag the blue (only this one!).

 

See the Pen 10150b34fdfd81f1e314f57355d7990d?editors=1010 by mikeK (@mikeK) on CodePen

 

Happy tweening ...

Mikel

 

 

  • Like 3
Link to comment
Share on other sites

  • 2 weeks later...

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