Skip to content

Commit

Permalink
Use a minimum width when creating the viewport (#1608)
Browse files Browse the repository at this point in the history
Co-authored-by: Julian Schuler <[email protected]>
  • Loading branch information
julianschuler and julianschuler authored Jan 25, 2025
1 parent 2de5e2f commit 955ba91
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/hulk_replayer/src/coordinate_systems.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ impl ViewportRange {
}

pub fn from_frame_range(frame_range: &FrameRange) -> Self {
const MINIMUM_WIDTH: f32 = 0.001;

Self::new(
RelativeTime::new(0.0),
RelativeTime::new(
Expand All @@ -222,7 +224,8 @@ impl ViewportRange {
.inner()
.duration_since(frame_range.start().inner())
.expect("time ran backwards")
.as_secs_f32(),
.as_secs_f32()
.max(MINIMUM_WIDTH),
),
)
}
Expand Down

0 comments on commit 955ba91

Please sign in to comment.