Fix crash on scrubbing

This commit is contained in:
Arkadiusz Fal 2022-08-08 19:28:25 +02:00
parent a29024698e
commit ddf306d5c1

View File

@ -281,7 +281,7 @@ struct TimelineView: View {
} }
var thumbTooltipOffset: Double { var thumbTooltipOffset: Double {
let leadingOffset = size.width / 2 - (tooltipSize.width / 2) let leadingOffset = abs(size.width / 2 - (tooltipSize.width / 2))
let offsetForThumb = thumbOffset - thumbLeadingOffset let offsetForThumb = thumbOffset - thumbLeadingOffset
guard offsetForThumb > tooltipSize.width / 2 else { guard offsetForThumb > tooltipSize.width / 2 else {