Skip to content

Commit 6f5bfa6

Browse files
authored
Merge pull request Sofie-Automation#1257 from nrkno/fix/infinite-piece-display/sofie-3408
fix(LinePartTimeline): make rules for findMainPiece consistent (SOFIE-3408)
2 parents 4a3a2e7 + 153d100 commit 6f5bfa6

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

meteor/client/ui/SegmentList/LinePartSecondaryPiece/LinePartSecondaryPiece.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const LinePartSecondaryPiece: React.FC<IProps> = React.memo(function Line
3838
const typeClass = piece?.sourceLayer?.type ? RundownUtils.getSourceLayerClassName(piece?.sourceLayer?.type) : ''
3939

4040
const pieceStyle = useMemo<CSSProperties>(() => {
41-
const width = timeInBase(piece.renderedDuration ?? partDuration, timelineBase, timelineBase)
41+
const width = timeInBase(piece.renderedDuration ?? Math.max(timelineBase, partDuration), timelineBase, timelineBase)
4242
const left = timeInBase(piece.renderedInPoint ?? 0, timelineBase, timelineBase)
4343
const overflow = Math.max(0, left + width - 100)
4444
return {

meteor/client/ui/SegmentList/LinePartTimeline.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@ import { PieceUi } from '../SegmentContainer/withResolvedSegment'
1414
import StudioContext from '../RundownView/StudioContext'
1515
import { InvalidPartCover } from '../SegmentTimeline/Parts/InvalidPartCover'
1616
import { getPartInstanceTimingId } from '../../lib/rundownTiming'
17+
import { getShowHiddenSourceLayers } from '../../lib/localStorage'
1718

1819
const TIMELINE_DEFAULT_BASE = 30 * 1000
1920

21+
const showHiddenSourceLayers = getShowHiddenSourceLayers()
22+
2023
interface IProps {
2124
part: PartExtended
2225
isLive: boolean
@@ -56,7 +59,7 @@ function findTimelineGraphics(pieces: PieceExtended[]) {
5659
.filter((piece) => {
5760
if (
5861
piece.sourceLayer?.type === SourceLayerType.LOWER_THIRD &&
59-
!piece.sourceLayer?.isHidden &&
62+
(showHiddenSourceLayers || !piece.sourceLayer?.isHidden) &&
6063
((piece.instance.piece.lifespan === PieceLifespan.WithinPart && piece.instance.piece.enable.duration) ||
6164
!piece.sourceLayer?.onListViewColumn)
6265
) {

meteor/client/ui/SegmentStoryboard/StoryboardPartThumbnail/StoryboardPartThumbnail.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const supportedSourceLayerTypes = new Set(
2121

2222
function findMainPiece(pieces: PieceExtended[]) {
2323
return findPieceExtendedToShowFromOrderedResolvedInstances(
24-
pieces.filter((piece) => piece.outputLayer?.isPGM),
24+
pieces.filter((piece) => piece.outputLayer?.isPGM && piece.sourceLayer?.onPresenterScreen),
2525
supportedSourceLayerTypes
2626
)
2727
}

0 commit comments

Comments
 (0)