NXL-18082357001 Preserve camera panning position in animator#188
Merged
elusiveuphoria merged 5 commits intoJan 26, 2026
Merged
Conversation
- Modified AnimatorImageSizer logic to check both scale and position - Now checks if positionX and positionY are at default (0, 0) - Previously only checked scale === 1, ignoring pan-only movements - This ensures pan state is retained when navigating between sections
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Panning retention now works correctly when navigating between sections - Initial/fresh loads use manual centering to display centered image - Default state (0,0,1) now properly detected and centered - Added console logging for debugging state transitions - Fixes issue where default state snapped to top-left corner
- Changed isAtDefault check to compare against manual center position - Previously checked for (0,0) which falsely matched when panning to edges - Now uses tolerance-based comparison with calculated center position - Fixes issue where panning to left/top edge would incorrectly recenter
- Changed satradSlice default to null instead of {0,0,1}
- Updated Animator and AnimatorImageSizer to handle null state
- Simplified logic: null = first visit (center), non-null = use stored
- Still need to update other slices (forecast, nexrad, climate, etc.)
|
elusiveuphoria
left a comment
Collaborator
There was a problem hiding this comment.
@Panguino Looks like it's working 👍 no more left edge nonsense.
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.
Monday.com Item
Monday Item ID: NXL-18082357001
Description
Problem: When users panned the animator view without zooming and then navigated to a different data section, the panning position was not retained. The view would reset to center instead of maintaining the user's pan state.
Root Cause: The AnimatorImageSizer.tsx component had logic that only checked if
scale === 1to determine whether to use stored zoom state or apply manual centering. When this condition was true, it applied manual centering, effectively ignoring the storedpositionXandpositionYvalues. This meant pan-only movements (wherescale === 1butpositionX !== 0orpositionY !== 0) were being ignored.Solution: Modified the condition to check if the zoom state is truly at default (no zoom AND no pan) by verifying that
scale === 1,positionX === 0, ANDpositionY === 0. Now the component correctly distinguishes between:Technical Details:
positionX,positionY, andscalepropertiesHow Has This Been Tested?
Manual Testing Required:
Pan-Only Retention Test:
Zoom-Only Retention Test:
Combined Zoom and Pan Test:
Default State Test:
Multiple Sections Test:
Screenshots/GIF (if appropriate):
N/A - Behavioral fix, testing required to validate
Types of changes