magland / figurl-timeseries-views

0 stars 0 forks source link

Code cleanup: combine window-setting logic used in auto-scroll and manual panning #3

Open jsoules opened 1 year ago

jsoules commented 1 year ago

In RecordingSelectionContext.ts, we have two sections that deal with scrolling what's visible in the window: the update (governed by autoScrollVisibleTimeRange) in setFocusTime and the panning logic for manual pans in panTime, panTimeDeltaT, and panTimeHelper.

These are all doing the same thing, so they should probably be calling the same code. I'm especially thinking of the code that ensures we don't pan outside the recording & that we maintain the visible window size if we do try to do so, but this just could use a revisit overall.