Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger avoidShowingBackground on load #1250

Open
martingarnett01 opened this issue Jan 13, 2025 · 2 comments
Open

Trigger avoidShowingBackground on load #1250

martingarnett01 opened this issue Jan 13, 2025 · 2 comments

Comments

@martingarnett01
Copy link

martingarnett01 commented Jan 13, 2025

I'm using avoidShowingBackground to clamp my partial pano, but on load, you can still see the black background (noticeable mainly on mobile – portrait viewports).

When clicking or tapping the pano for the first time, it kicks into action and behaves how I want it to (on all screen resolutions, eg. desktop and mobile).

Example:
https://codepen.io/martingarnett01/pen/GgKdRPm

Any ideas on whether I can change a setting or somehow trigger the avoidShowingBackground onLoad?

@mpetroff
Copy link
Owner

mpetroff commented Jan 18, 2025

I can reproduce this issue with v2.5.6, but it seems to work correctly with the current Git master branch. The code that handles the avoidShowingBackground did not change. I was able to bisect the change that fixed this to 44e878f; based on what fixed it, it seems that the issue was due to a bug in how the window size was being reported.

I'm going to close this issue, since it seems to have already been fixed, even if the fix is not yet in release. Feel free to reopen it, if you can still reproduce the issue in the current master branch.

@martingarnett01
Copy link
Author

Awesome, thanks for confirming I wasn't doing something wrong. :)

I'm using the CDN you provide right now, so I'll report back on the next release to confirm it's all fixed.

Thanks again and thanks for building this cool tool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants