Skip to content

889 dre keep zoom level when switich from live view to historical view#1118

Open
Oshgnacknak wants to merge 3 commits intomasterfrom
889-dre-keep-zoom-level-when-switich-from-live-view-to-historical-view
Open

889 dre keep zoom level when switich from live view to historical view#1118
Oshgnacknak wants to merge 3 commits intomasterfrom
889-dre-keep-zoom-level-when-switich-from-live-view-to-historical-view

Conversation

@Oshgnacknak
Copy link
Collaborator

@Oshgnacknak Oshgnacknak commented Feb 4, 2026

Seems to work fine. I can set 1min for live. Select a region; and when going back to live, Im also back at 1min.

@Oshgnacknak Oshgnacknak force-pushed the 889-dre-keep-zoom-level-when-switich-from-live-view-to-historical-view branch from f956c04 to 22ab8f3 Compare February 4, 2026 15:31
@Oshgnacknak Oshgnacknak marked this pull request as ready for review February 4, 2026 15:43
@Oshgnacknak Oshgnacknak requested a review from Snacj February 4, 2026 15:43
import { TimeSeries } from "@/lib/timeseries";
import { RefObject } from "react";

export type SwitchOrigin = "button" | "gesture" | null;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the type instead?

null,
);

const historicalSwitchOriginRef = useRef<"button" | "gesture" | null>(null);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, use the type instead of inlineing it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DRE Keep zoom level when switich from live view to historical view

2 participants