fix: unfreeze terrain elevation before firing gesture end events - #8102
fix: unfreeze terrain elevation before firing gesture end events#8102xvodddwannaG wants to merge 2 commits into
Conversation
7f2f6fa to
db5bbb9
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8102 +/- ##
=======================================
Coverage 93.09% 93.10%
=======================================
Files 300 300
Lines 24899 24899
Branches 6540 6540
=======================================
+ Hits 23179 23181 +2
+ Misses 1720 1718 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Also please check if freeze elevation is always "released", I think there might be cases where it not, but I'm not sure... |
db5bbb9 to
50da5f8
Compare
|
Rebased; still relevant, the test fails on main and passes with the change. On the freeze: yes, outside the gesture path. |
|
I'm not sure I fully follow the last statement, is there a bug that needs to be fixed with freeze elevation besides the bug you solves here, which as far as I understand is mostly about moving the fire a bit down the call logic...? Also if you want this to be merged it needs to be in "ready to review" state, it's currently in draft. |
Launch Checklist
Refs #7989.
_fireEventsdispatched the end events first and lifted the elevation freeze after, sorecalculateZoomAndCenterran betweendragendandmoveend. Over Chamonix the center moved 257-708 m across the ~2.5 ms gap.This unfreezes the elevation above the end-event dispatch, which is the order
easeToalready uses:_finalizeElevation(same unfreeze, samerecalculateZoomAndCenter) runs before_afterEasefiresmoveend. The inertial gesture already goes down that path (inertialEase.freezeElevation = true); this gives the non-inertial one the same order.Scope, since #7989 asks for more than this. What changes is the camera reported by the gesture's end events,
dragendandzoomendon a terrain zoom, which now agree withmoveend. Nothing moves on screen that didn't before.The visible jump can't be removed while
centerClampedToGroundis on: if the ground rises under the center mid-gesture and the center has to stay on the ground, the camera has to move. Skipping the correction (@NeluQi's preference in the issue) removes the jump but leaves the center off-ground, and the correction likely reappears on the next gesture. Animating it aftermoveendremoves the discontinuity without giving up the invariant, at the cost of motion nobody asked for. Happy to switch to either.Rebased onto #8067; its
_terrainGestureAnchorElevationreset moves with the rest of the block.CHANGELOG.mdunder the## mainsection.Assisted-By: Claude Code (Opus 5)