-
Notifications
You must be signed in to change notification settings - Fork 54
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
Pinch to zoom #1952
Pinch to zoom #1952
Conversation
Hello there, We hope that the reviewing process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR reviewing process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! |
@starypatyk I don't have much time for Viewer lately, thank you for this PR (and your patience 🙈) |
@skjnldsv No worries. 😉 Thanks for letting me know. Waiting patiently then. 🐌 |
6aa8c2e
to
88eb282
Compare
Hi @skjnldsv, Any chance to go forward with this PR? FYI - I have rebased and re-checked the implementation. Seems to behave decently. Tested as previously on Android and iPad. This still requires some clean-up - see my questions in the first comment (I have updated commit references after rebase in the original comment). |
88eb282
to
698afa4
Compare
698afa4
to
62842db
Compare
/compile / |
Patience came to an end, let get this in! Btw, if you're interested, I sketched an RFC for an improved Viewer version 3.0. |
cypress fix: #2436 |
0d0a13c
to
4f4c20d
Compare
Fixing the public view rendering :) |
Signed-off-by: Dariusz Olszewski <[email protected]>
Signed-off-by: Dariusz Olszewski <[email protected]>
Signed-off-by: Dariusz Olszewski <[email protected]>
Signed-off-by: Dariusz Olszewski <[email protected]>
Signed-off-by: Dariusz Olszewski <[email protected]>
Signed-off-by: nextcloud-command <[email protected]>
Signed-off-by: skjnldsv <[email protected]>
efa6d73
to
77c3fae
Compare
@skjnldsv - Great to see this merged finally! 😉 Thanks 👍 |
Here is my initial pinch-to-zoom implementation. This should resolve #916 and #917.
I have not committed the compiled code yet, to make rebasing easier.
Some explanation of the changes:
In 003f31f I have switched from mouse events to more generic pointer events (see https://developer.mozilla.org/en-US/docs/Web/API/Pointer_events).
e96662c is the actual implementation.
updateZoom
method was extracted toupdateZoomAndShift
and I created an additional common methodupdateShift
.pointerCache
.I committed aeab2bd separately, to make it easier to follow the changes.
1f0fced was required after recent changes in
master
- as I removed thewidth/height: 100%
from CSS.I have the following questions:
width/height: 100%
. I am not sure which one is better. Any suggestions?pointerMove
andpointerUp
handlers are now attached all the time. I am not sure what should be done here:viewer/src/components/Images.vue
Line 219 in 698afa4
viewer/src/components/Images.vue
Line 223 in 698afa4
pointerOut
that would invokeresetZoom
? I do not know how to test this case. Suggestions welcome.NcModal
(fix(NcModal): Close button should be visible even if modal content is scrolled nextcloud-libraries/nextcloud-vue#4350) affect zooming behaviour. Now, when the image is enlarged a bit from 100%, a scrollbar is shown, and this causes a slight shift in image position. This happens on Chrome and Chrome Mobile (for some reason Firefox does not show the scrollbar). This is not a major problem, but isquitea bit annoying. I wonder if we should try to have some workaround in this PR or leave it for a separate PR.