Skip to content

Commit

Permalink
fix: floor number
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Oct 8, 2024
1 parent e81d348 commit bb13e1e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const CurrentPartOrSegmentRemaining = withTiming<IPartRemainingProps, {}>
tickResolution: TimingTickResolution.Synced,
dataResolution: TimingDataResolution.Synced,
})(
class CurrentPartRemaining extends React.Component<WithTiming<IPartRemainingProps>> {
class CurrentPartOrSegmentRemaining extends React.Component<WithTiming<IPartRemainingProps>> {
render(): JSX.Element | null {
if (!this.props.timingDurations || !this.props.timingDurations.currentTime) return null
if (this.props.timingDurations.currentPartInstanceId !== this.props.currentPartInstanceId) return null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@ export const SegmentDuration = withTiming<ISegmentDurationProps, {}>()(function
const segmentTimingType = props.segment.segmentTiming?.countdownType ?? CountdownType.PART_EXPECTED_DURATION

let budget = segmentBudgetDuration ?? 0
let hardFloor = false

if (segmentTimingType === CountdownType.SEGMENT_BUDGET_DURATION) {
hardFloor = true

if (props.timingDurations.currentSegmentId === props.segment._id) {
duration = props.timingDurations.remainingBudgetOnCurrentSegment ?? segmentBudgetDuration ?? 0
} else {
Expand Down Expand Up @@ -80,7 +83,7 @@ export const SegmentDuration = withTiming<ISegmentDurationProps, {}>()(function
})}
role="timer"
>
{RundownUtils.formatDiffToTimecode(value, false, false, true, false, true, '+')}
{RundownUtils.formatDiffToTimecode(value, false, false, true, false, true, '+', false, hardFloor)}
</span>
</>
)
Expand Down

0 comments on commit bb13e1e

Please sign in to comment.