This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Nick Bewley
Posted Sep 09 - Read on Facebook

What's the best way to position something relative to another element? I have a pie graph and want to position tooltips relative to their respective slices. If I have slices "sliceA, sliceB, etc" and want to position "tooltipA, tooltipB, etc" relative to their respective slices, how would you go about positioning the tooltips to appear relative to their slices? Trying to be as DRY as possible with this.. Thanks for sharing your approach!


Koen Bok

I would use layer.screenFrame which gives you the current absolute position on screen.

Mike Feldstein

You could also make the pie pieces the superLayer of the popup

Ces Cortez

Nick Bewley Here's a CodePen example using the layer.screenFrame property that Koen Bok mentioned:

Nick Bewley

Awesome thanks all for the tips

Read the entire post on Facebook