-
Notifications
You must be signed in to change notification settings - Fork 396
Fix "Pillars on Side" layout scaling on desktop #1005
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
Conversation
|
I ended up not swapping the cameras, I see why they were swapped in the first place. 😅 |
|
Note that I made the viewer scrollable, which should make the bottom videos in your "before" picture above accessible. Not sure how this interacts with this change. |
| if (typeof currentsequence !== 'undefined') { | ||
| setTimeout(function() { | ||
| for (var i=0; i < 6;i++) { | ||
| var v = videoelems[i]; | ||
| var c = canvaselems[i]; | ||
|
|
||
| if (v.clientWidth > 0 && v.clientHeight > 0) { | ||
| c.width = v.clientWidth; | ||
| c.height = v.clientHeight; | ||
| } | ||
|
|
||
| if (v.style.visibility == "hidden") { | ||
| var ctx = c.getContext("2d"); | ||
| if (v.classList.contains("flipped")) { | ||
| ctx.scale(-1, 1); | ||
| ctx.drawImage(v, 0, 0, -c.width, c.height); | ||
| } else { | ||
| ctx.drawImage(v, 0, 0, c.width, c.height); | ||
| } | ||
| } | ||
| } | ||
| }, 50); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section is quite similar to the freezeVideoElems function. Could this be a common function or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The layout update path intentionally mirrors the existing freezeVideoElems flow so the behavior stays consistent, which is why you’re seeing similar code there.
Created new pull request #1013 , tested and everything works as intended still. |
Before:


After:
I've also swapped the camera positions, but if you prefer it wasn't changed I can revert that.