Repository navigation
A scroll container zooms its one child by pinch on iOS - #11
Merged
Merged
Conversation
minimumZoomScale, maximumZoomScale and zoomScale on a scroll with one child are UIScrollView's own zoom: a pinch scales the child about the fingers through the range, with UIKit's bounce at both ends, and zoomScale is where it opens and where it goes when the value changes. UIKit zooms a view of its own placed over the child; the child is drawn from the scroller's scale through hostPlacement, so its transform, a press and an animation compose with it. The child keeps its layout: the extent grows by its size times the scale, and it is centred while the whole is smaller than the port. Other hosts ignore the three.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
minimumZoomScale,maximumZoomScaleandzoomScaleon a scroll container with one child areUIScrollView's own zoom on iOS. A pinch scales the child about the fingers through the range, with UIKit's bounce at both ends.zoomScaleis the scale the scroller opens at, and the one it moves to when the value changes. Other hosts ignore the three.The child keeps its layout. UIKit zooms a view of its own, placed over the child. The child is drawn from the scroller's scale through
hostPlacement, so its own transform, a press and an animation compose with the zoom. The scroller's extent grows by the child's size times the scale, and the child is centred while the whole is smaller than the port.This is based on #10, the sync with expo/exact a107143. Retarget it to
mainonce #10 merges.Notes
kernel/tables/schema.json, after the sync's 310 and 311, and the schema digest is recomputed.Presenter.applyintorestoreScrollPositions(ScrollViewIOS.swift).settleZoom()runs there, after a scroller's position is restored and before any authored offset lands.Test plan
cargo test -p exact-kernel --lib wire::codec, andbun scripts/caps.mjsis within every cap.