-
Notifications
You must be signed in to change notification settings - Fork 112
Use telephoto for panning and zooming #1421
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
Use telephoto for panning and zooming #1421
Conversation
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
| rememberZoomableState( | ||
| zoomSpec = ZoomSpec(maxZoomFactor = 1f) | ||
| ).also { | ||
| it.contentScale = ContentScale.Fit |
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.
It might be worth exploring ContentScale.Crop for large traces
|
@saket sorry I need to take a look to see why the I did add you to the team list for this repo so I thought that would in the mean time workaround the write perms issue, but it seems it is not 😕 . |
0a2acb4 to
84cffb0
Compare
|
I did not expect merging my other branch to close this branch 😬 . I'll try to rebase the branch and reopen against main. |
Context: #1417 (comment)
This PR removes all custom pointer handlers in
SandboxBackground()so thatModifier.zoomable()can take care of both panning and zooming.One change to call out is that zooming with the mouse scroll now behaves differently. Previously, you were using scroll alone, but telephoto uses
Option+ scroll by default to match the behavior of other macOS apps. If you prefer the old behavior, you can change this if you want by writing a custom HardwareShortcutsSpec.It might be a good idea to display all shortcuts somewhere in the UI. Here's what telephoto uses:
https://saket.github.io/telephoto/zoomable/#keyboard-shortcuts
Your app actually helped uncover a few bugs in
telephoto, which historically hasn't been well optimized for non-Android targets. Some worth mentioning:Zoom using keyboard and mouse shortcuts is currently broken because
telephotois miscalculating zoom factors. I'll push a fix soon.Overzoom doesn't look great right now. I'll disable it for hardware shortcuts in a future release.
CleanShot.2025-09-05.at.15.57.01.mp4