Skip to content

iOS: Clear transient edge padding for unchanged camera - #4537

Open
miakh wants to merge 1 commit into
maplibre:mainfrom
miakh:fix/4449-clear-transient-edge-padding
Open

iOS: Clear transient edge padding for unchanged camera#4537
miakh wants to merge 1 commit into
maplibre:mainfrom
miakh:fix/4449-clear-transient-edge-padding

Conversation

@miakh

@miakh miakh commented Aug 29, 2026

Copy link
Copy Markdown

Fixes #4449.

setCamera now compares the requested effective padding with the padding currently held by the core map before treating an unchanged camera as a no-op. This allows zero edgePadding to clear earlier transient padding.

The regression test applies bottom padding, sets the same camera again with zero padding, and verifies that only contentInset remains.

Tested with:

  • bazel test //platform/ios/test:ios_test --test_output=errors --//:renderer=metal --test_filter="MLNMapViewGestureRecognizerTests/testSetCameraClearsTransientEdgePaddingWhenCameraIsUnchanged"

AI usage: OpenAI Codex (GPT-5) assisted with the implementation and tests under human supervision.

@github-actions github-actions Bot added the iOS label Aug 29, 2026
@miakh

miakh commented Aug 29, 2026

Copy link
Copy Markdown
Author

Reproduction on iPhone 17 Pro Simulator (iOS 26.5), recorded 30 Aug 2026.

Red dot = target coordinate; blue cross = screen center. After clearing padding with the same camera, current main remains 90 pt offset; this branch returns to 0 pt.

Before (current main):

before-iphone17.mp4

After (this branch):

after-iphone17.mp4

@miakh
miakh force-pushed the fix/4449-clear-transient-edge-padding branch from 05d2bde to f3471bd Compare September 1, 2026 21:37
@miakh
miakh marked this pull request as ready for review September 1, 2026 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[iOS] setCamera does not clear transient edgePadding when camera is unchanged

1 participant