889 dre keep zoom level when switich from live view to historical view#1118
Open
Oshgnacknak wants to merge 3 commits intomasterfrom
Open
889 dre keep zoom level when switich from live view to historical view#1118Oshgnacknak wants to merge 3 commits intomasterfrom
Oshgnacknak wants to merge 3 commits intomasterfrom
Conversation
f956c04 to
22ab8f3
Compare
Oshgnacknak
commented
Feb 4, 2026
| import { TimeSeries } from "@/lib/timeseries"; | ||
| import { RefObject } from "react"; | ||
|
|
||
| export type SwitchOrigin = "button" | "gesture" | null; |
Collaborator
Author
There was a problem hiding this comment.
The type should not be nullable. Instead, use ? in a parameter, where appropriate.
| lastProcessedCountRef.current = 0; // Reset processed count | ||
| }, [captureHistoricalFreezeTimestamp, animationRefs, lastProcessedCountRef]); | ||
| const switchToHistoricalMode = useCallback( | ||
| (origin?: "button" | "gesture" | null) => { |
Collaborator
Author
There was a problem hiding this comment.
Use the type instead?
| null, | ||
| ); | ||
|
|
||
| const historicalSwitchOriginRef = useRef<"button" | "gesture" | null>(null); |
Collaborator
Author
There was a problem hiding this comment.
Again, use the type instead of inlineing it
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.
Seems to work fine. I can set 1min for live. Select a region; and when going back to live, Im also back at 1min.