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

Display images with new image viewer (UIScrollView version) #1413

Merged
merged 24 commits into from
Aug 21, 2024
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
9465df8
#1164: first pass at new image viewer
joshuatbrown Aug 14, 2024
e46fe9a
allow dragging the image; constrain it a bit, but not enough
joshuatbrown Aug 15, 2024
ca15c4c
Merge branch 'main' into new-image-viewer
joshuatbrown Aug 15, 2024
97c4013
constrain panning to the right values
joshuatbrown Aug 15, 2024
b7247f2
fix drag lag
joshuatbrown Aug 15, 2024
4ed9cf3
refactor, and fix a little offset bug
joshuatbrown Aug 15, 2024
832d301
double-tap or pinch to zoom on a specific point in the image
joshuatbrown Aug 15, 2024
1e7c58e
Merge branch 'main' into new-image-viewer
joshuatbrown Aug 15, 2024
93c14ac
simpler version using scroll view
joshuatbrown Aug 15, 2024
5d9a007
simplify further
joshuatbrown Aug 15, 2024
4443e46
present with sheet; add presentation to ImageLinkButton
joshuatbrown Aug 16, 2024
40a9cf8
ignore safe area; fix sizing issue
joshuatbrown Aug 16, 2024
dd7843f
add ImageViewer to test target to fix error
joshuatbrown Aug 16, 2024
fa28638
fix double-tap to zoom
joshuatbrown Aug 16, 2024
7c80f1a
Display images in image viewer (UIScrollView edition)
joshuatbrown Aug 16, 2024
3095f38
add docs, simplify code per PR suggestions
joshuatbrown Aug 16, 2024
388a6a9
move ZoomableContainer to its own file; give credit where credit is due
joshuatbrown Aug 16, 2024
3f6998f
remove lots of unused code from a different implementation
joshuatbrown Aug 16, 2024
43bdf94
rename image viewer background color; update CHANGELOG
joshuatbrown Aug 16, 2024
0f6ee06
make close button bigger
joshuatbrown Aug 16, 2024
281648e
set image viewer background to black
joshuatbrown Aug 19, 2024
7e684f4
Merge branch 'main' into uiscrollview-image-viewer
joshuatbrown Aug 19, 2024
8dd06e8
Merge branch 'main' into uiscrollview-image-viewer
joshuatbrown Aug 20, 2024
1a77f24
Merge branch 'main' into uiscrollview-image-viewer
joshuatbrown Aug 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix double-tap to zoom
  • Loading branch information
joshuatbrown committed Aug 16, 2024
commit fa2863892842a12ce7db8b5f511c9c11ba9b8e30
2 changes: 1 addition & 1 deletion Nos/Views/Components/Images/ImageViewer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ struct ImageViewer: View {
.aspectRatio(contentMode: .fit)
.gesture(doubleTapGesture)
.frame(width: proxy.size.width * zoomScale)
.frame(maxHeight: .infinity)
.frame(height: proxy.size.height * zoomScale)
}
.defaultScrollAnchor(.center)
}
Expand Down
Loading