Skip to content

Commit a902163

Browse files
committed
wip: update label reference in AdjustLabelFit
1 parent c7c33c9 commit a902163

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

packages/webui/src/client/ui/ClockView/DirectorScreen.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,9 +348,6 @@ function DirectorScreenRender({
348348
useSetDocumentClass('dark', 'xdark')
349349

350350
if (playlist && playlistId && segments) {
351-
const currentPartOrSegmentCountdown =
352-
timingDurations.remainingBudgetOnCurrentSegment ?? timingDurations.remainingTimeOnCurrentPart ?? 0
353-
354351
const expectedStart = PlaylistTiming.getExpectedStart(playlist.timing) || 0
355352
const expectedEnd = PlaylistTiming.getExpectedEnd(playlist.timing)
356353
const expectedDuration = PlaylistTiming.getExpectedDuration(playlist.timing) || 0

packages/webui/src/client/ui/util/AdjustLabelFit.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ export const AdjustLabelFit: React.FC<AdjustLabelFitProps> = ({
231231
// Check if label has changed
232232
if (prevLabelRef.current !== label) {
233233
prevLabelRef.current = label
234-
resetLabelStyles()
235234
adjustTextToFit()
236235
}
237236
}, [label])
@@ -247,14 +246,12 @@ export const AdjustLabelFit: React.FC<AdjustLabelFitProps> = ({
247246
const handleResize = () => {
248247
cancelAnimationFrame(resizeTimer)
249248
resizeTimer = requestAnimationFrame(() => {
250-
resetLabelStyles()
251249
adjustTextToFit()
252250
})
253251
}
254252

255253
// Properties change
256254
const handlePropsChange = () => {
257-
resetLabelStyles()
258255
adjustTextToFit()
259256
}
260257

@@ -271,7 +268,7 @@ export const AdjustLabelFit: React.FC<AdjustLabelFitProps> = ({
271268
cancelAnimationFrame(adjustmentTimer)
272269
if (resizeTimer) cancelAnimationFrame(resizeTimer)
273270
}
274-
}, [width, fontFamily, fontSize, minFontWidth, maxFontWidth, minLetterSpacing])
271+
}, [label, width, fontFamily, fontSize, minFontWidth, maxFontWidth, minLetterSpacing])
275272

276273
return (
277274
<div ref={containerRef} className={`adjust-label-fit ${className}`} style={finalContainerStyle}>

0 commit comments

Comments
 (0)