Mobile - move overlays to scrolled viewport

Hey I have a mobile clickdummy (360x640px) and I want to trigger overlays that move to the current viewport and fill the entire screen.

Can you tell me why
Move to [[Window.scrollX]], [[Window.scrollY]] doesn’t work?

It’s never centered. What am I missing? Thanks!

Hi zzlpz!

The action to move your widget to [[Window.scrollX]], [[Window.scrollY]] would make it so that your dummy widget would appear in the top left most coordinates of the given scrolling position. However, if you would like to make it so that this widget resizes to fill the screen, you can add a Set Size action that sets the size of the widget to [[Window.width]], [[Window.height]]. This will make it so that the widget will resize to fill the space of the window’s current dimensions, as well as move to the correct coordinates as the page is scrolled through.

If you would like to have the dummy widget centered while the widget does not fill the whole window, you could look into creating another widget contained in a dynamic panel. Dynamic panels can be pinned to coordinates on a web browser page, so you could pin the dynamic panel to the center of the page. These pinned properties are not able to be toggled from within the web browser, so creating a separate widget in a dynamic panel, and then making the dynamic panel show and hide as needed would be a good way to handle this pinning behavior.

You can find a sample of this behavior in our scroll-activated sticky header tutorial here.

I hope this helps!

Actually my approach was correct, I guess the problem was my overlay was inside a dynamic panel. Now it works. Thanks for your reply. I appreciate it.