Copy link to clipboard
Copied
So, I have an artboard that shows up like a popup using the overlay function. On the preview page, if I've scrolled down, the popup shows up at the wrong place on the page.
I suspect that the overlay function uses an absolute position on the screen with hardcoded distances from TOP and LEFT, but if the Preview is scrolled, then those values (or rather the TOP value) should change.
Hope that makes any sense : )
Logically an overlay needs to be positioned within the viewport. Sounds like you are after the component states instead?
Copy link to clipboard
Copied
Logically an overlay needs to be positioned within the viewport. Sounds like you are after the component states instead?
Copy link to clipboard
Copied
Well, no. The idea is that the location of the Artboard that is called through the overlay function in the Prototype mode seems to be based on the window in the Preview screen, rather than on the document itself. So that when the scroll value is 0 everything is perfectly aligned, but if I call the overlay when I have scrolled, the scrolled pixels aren't taken into account in the overlay element's position.
I now realize that I might not be using the thing the way it's intended to be used. An overlay should cover the whole screen and contain a modal or some sort of information that OVERLAYS everything else, whereas I'm trying to call a popup. Sorry if I wasted your time!
https://drive.google.com/open?id=1xTGNFi4C44h-oK5bJEkrv-2r8FbcGq9b
https://drive.google.com/open?id=1mkN9Vjg3tyBiO3GhFSoLpHpTUtbmksGt
Copy link to clipboard
Copied
I created a phone keyboard but when I did overlays of typed letters, they were in the wrong place.
That's because I attached the overlays to the grouped content of each letter.
But when I created an invisible rectangle on top of each letter then attached overlay to that, the resulting overlays appearing in the correct position.