Repository navigation
Keep a bounded gesture area's content on screen - #173
Merged
Merged
Conversation
Pan stops at the zoomed content's edges and centres an axis it fits on, drags past an edge meet resistance and spring back on release, and a pinch zooms around the fingers and pans with them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
simonhamp
added a commit
to ricardovfreixo/dev-null-app
that referenced
this pull request
Oct 24, 2026
Both are drafts (NativePHP/mobile-air#603, NativePHP/mobile-ui#173). Swap back to dev-main once they're merged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
simonhamp
added a commit
to NativePHP/dev-null-app
that referenced
this pull request
Oct 24, 2026
* View commit images natively with zoom and gallery controls * Use released camera plugin instead of deleted branch * Remove completed native image viewer roadmap item * Keep the viewed image on screen: bounded pan, springing back to centre at 1x * Require the bounded gesture area branches of mobile-air and mobile-ui Both are drafts (NativePHP/mobile-air#603, NativePHP/mobile-ui#173). Swap back to dev-main once they're merged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Simon <simon.hamp@me.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
simonhamp
marked this pull request as ready for review
October 24, 2026 02:29
This was referenced Oct 24, 2026
simonhamp
added a commit
to NativePHP/dev-null-app
that referenced
this pull request
Oct 24, 2026
…#85) * Use mobile-air and mobile-ui main again The bounded gesture area work is merged (NativePHP/mobile-air#603 and NativePHP/mobile-ui#173), so the app goes back to requiring dev-main of both, with the same 4.6.0 and 0.8.0 aliases. The dev-main heads have the same tree as the feature branches #70 locked to, so no code changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Catch the Boost agent files up with main Merging #83 into #84 by hand skipped the boost:update rerun, so AGENTS.md was still #83's older copy and .agents/skills only held ui-screenshots. This reruns it on dev-main of nativephp/mobile, which also adds the nativephp-agent-loop skill (agents drive native:run, screenshots and the device log on a simulator themselves) and points the nativephp-mobile skill at it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
The iOS and Android side of
boundedandcontent-ratioon<native:gesture-area>(the element change is NativePHP/mobile-air#603).With
boundedset, on both platforms:(scale * content - area) / 2each way, per axis. The content is the area, orcontent-ratiofitted inside it. An axis where the zoomed content fits has a limit of zero, so it stays centred.@dragEndreports where the pan will come to rest, not where the finger let go.Things a reviewer might wonder about:
UIPinchGestureRecognizer(throughUIGestureRecognizerRepresentable, like the swipe recognizer) instead ofMagnifyGesture.MagnifyGestureonly gives the location where the pinch started, so it can't follow the fingers.CADisplayLink. AwithAnimationwrite doesn't work here becauseNodeAnimationModifierapplies.animation(nil, value:)to bound transforms. On Android it's Compose'sanimate.boundedtakes the same code paths as before.Tested on an iPhone 16 Pro (iOS 27.2) and a moto g24 (Android 14) in the devnull app's image viewer (NativePHP/dev-null-app#70). On the moto a one-finger drag at 1x trailed the finger with resistance and sprang back to the centre on release. Pinching needs a person on a device, since adb can't do two fingers. Both platforms compile in Debug, and the PHP suite passes.
Docs: NativePHP/nativephp.com#581.
🤖 Generated with Claude Code