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

Broken layout of camera view area in web demo #52

Closed
1j01 opened this issue Apr 13, 2024 · 3 comments
Closed

Broken layout of camera view area in web demo #52

1j01 opened this issue Apr 13, 2024 · 3 comments
Labels
affects:web-library Affects usage of the tracky-mouse.js library bug Something isn't working closed with followup notes Generally done, but some further improvements/actions are noted.

Comments

@1j01
Copy link
Owner

1j01 commented Apr 13, 2024

The layout was broken in e46a2cc when fixing #9 because I only tested on the desktop app, which doesn't need to prompt for camera access.

@1j01 1j01 added bug Something isn't working affects:web-library Affects usage of the tracky-mouse.js library labels Apr 13, 2024
@1j01
Copy link
Owner Author

1j01 commented Apr 13, 2024

Actually it's not just a problem with the "Allow Camera Access" button. Even after allowing access, the camera view is not visible in the web demo.
Conversely, in the desktop app, the "Allow Camera Access" button shows up fine (while the app is loading).
So I guess I was right to tag this with affects:web-library and not affects:desktop-app.

I'm not sure what's going on though.
Why are all of these collapsed to 0 or 20 (line height?) pixels in height? And not in the desktop app?

  • .tracky-mouse-canvas-container-container
  • .tracky-mouse-canvas-container
  • .tracky-mouse-canvas-overlay
  • .tracky-mouse-canvas

@1j01
Copy link
Owner Author

1j01 commented Apr 13, 2024

Okay, so the desktop app includes html, body, .tracky-mouse-ui { height: 100%; }
The solution I came up with for the layout doesn't give these elements any intrinsic height, unfortunately.
I should just need a min-height somewhere though...

@1j01 1j01 changed the title Broken layout of camera view area before camera feed is established Broken layout of camera view area in web demo Apr 13, 2024
@1j01 1j01 closed this as completed in 451e88b Apr 14, 2024
@1j01
Copy link
Owner Author

1j01 commented Apr 14, 2024

I've fixed this but not in the simplest/best way.

I could leave min-height unset (auto), for the web demo, where the .tracky-mouse-ui is unconstrained in height. This way, the camera area can actually have an intrinsic height based on its width and aspect-ratio.
This would also provide two benefits to the web demo:

  • When the viewport is wide, the camera view area would expand to exactly fill the width of the container. Right now it's limited by the min-height combined with the aspect-ratio, leaving space to the left and right.
  • When the viewport is very narrow, the camera view area would avoid useless space below it. Right now, the width fits nicely but the fixed min-height causes it to take up extra height.

@1j01 1j01 added the closed with followup notes Generally done, but some further improvements/actions are noted. label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects:web-library Affects usage of the tracky-mouse.js library bug Something isn't working closed with followup notes Generally done, but some further improvements/actions are noted.
Projects
None yet
Development

No branches or pull requests

1 participant