Skip to main content
Vishal_Ramawat
April 18, 2024

Swapped Overlay Position Solution

  • April 18, 2024
  • 4 replies
  • 810 views

I came across the problem of “Setting the position of next overlay after Swap overlay”. I searched the community that people have requested the feature for the same and there was no solution.
I tried successfully.
On Overlay 1, I used following interactions consecutively:
Close Overlay and then Open Overlay 2.
Now I could set the Overlay Position as needed, irrespective of Overlay 1 position.

Do let me know if this works for you guys!
@Dario1

4 replies

Dario1
New Participant
April 18, 2024

Hello @Vishal_Ramawat! Composing interactions worked for me when the events are linked to the Overlay itself. Does it work for you when the interactions (Close + Open 2nd) are attached to a layer within the Overlay?

For example, I want a button within Overlay 1 to close Overlay 1 and trigger Overlay 1.

In my case, the Overlay 1 closes and 2 never opens:

Dario1
New Participant
April 18, 2024

Or say:

In Overlay 1:

  • The left button closes Overlay 1 and opens Overlay 2, positioned Top Left
  • The right button closes Overlay 1 and opens Overlay 3, positioned Top Right

Dario1
New Participant
April 18, 2024

…Actually it works: would appear that Component interactions are getting in the way. Getting rid of them worked fine.

I still find Figma “scripting” and event handling still kinda fragile or very picky.

Vishal_Ramawat
April 19, 2024

Yeah, it worked for me as well. Like, if you want to create OnBoarding steps, the position of Tips can differ on screen and clicking Next button on each tip can link to next tip.
I guess, it’s the way for now 🙂