Timeline tweaks (#10693)

* make segment height static

* fix timeline overscrolling

* better alignment of motion timeline segments
This commit is contained in:
Josh Hawkins
2024-03-26 15:36:28 -06:00
committed by GitHub
parent 1377d33e25
commit c82ed43c13
10 changed files with 48 additions and 55 deletions
+2 -6
View File
@@ -40,13 +40,9 @@ export function useTimelineUtils({
const getVisibleTimelineDuration = useCallback(() => {
if (timelineRef?.current && timelineDuration) {
const {
scrollHeight: timelineHeight,
clientHeight: visibleTimelineHeight,
} = timelineRef.current;
const { clientHeight: visibleTimelineHeight } = timelineRef.current;
const segmentHeight =
timelineHeight / (timelineDuration / segmentDuration);
const segmentHeight = 8;
const visibleTime =
(visibleTimelineHeight / segmentHeight) * segmentDuration;