• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Overlayed object shows on wrong place when the Preview is scrolled

Explorer ,
Nov 08, 2019 Nov 08, 2019

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 : )

Views

557

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Nov 08, 2019 Nov 08, 2019

Logically an overlay needs to be positioned within the viewport. Sounds like you are after the component states instead?

Votes

Translate

Translate
Community Expert ,
Nov 08, 2019 Nov 08, 2019

Copy link to clipboard

Copied

Logically an overlay needs to be positioned within the viewport. Sounds like you are after the component states instead?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 11, 2019 Nov 11, 2019

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 17, 2023 Jun 17, 2023

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines