21 lines
1.1 KiB
C#
21 lines
1.1 KiB
C#
namespace DeepDrftPublic.Client.Services;
|
|
|
|
/// <summary>
|
|
/// Holds the Mix visualizer's zoom (visible time-span in seconds) for the lifetime of the WASM app
|
|
/// instance. Scoped in DI, so it lives across SPA navigations within one listening session — open a
|
|
/// second mix and the slider keeps where you left it — but a fresh page load (F5) constructs a new
|
|
/// instance, resetting to the default. That matches the spec's "persist within session, reset on
|
|
/// fresh load" without any cookie/localStorage round-trip (see phase-9-mix-visualizer-redesign §B).
|
|
/// </summary>
|
|
public sealed class MixVisualizerZoomState
|
|
{
|
|
/// <summary>
|
|
/// Default opening window. Mirrors <c>DEFAULT_VISIBLE_SECONDS</c> in MixVisualizer.ts; keep the
|
|
/// two in sync (the TS owns the rendering anchors, this owns the C#-side session default).
|
|
/// </summary>
|
|
public const double DefaultVisibleSeconds = 10.0;
|
|
|
|
/// <summary>Visible time-span in seconds. Survives navigation; resets on fresh page load.</summary>
|
|
public double VisibleSeconds { get; set; } = DefaultVisibleSeconds;
|
|
}
|