diff options
author | lonkaars <loek@pipeframe.xyz> | 2021-06-14 11:20:01 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2021-06-14 11:20:01 +0200 |
commit | 0d30ce10e54a894edb12b77330cc3c5edae83705 (patch) | |
tree | be90863826d649c8349e572bf8b7fa2dba368572 | |
parent | c6a62404fa7a46e7eea1a832291ed3634ec68c90 (diff) |
selection doesn't break with new keyframes
-rw-r--r-- | pages/editor.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pages/editor.tsx b/pages/editor.tsx index be8e0c6..36247a6 100644 --- a/pages/editor.tsx +++ b/pages/editor.tsx @@ -216,6 +216,7 @@ function TimelineEditor(props: { var workingTimeline = useWorkingTimeline((st: any) => st.timeline); var setWorkingTimeline = useWorkingTimeline((st: any) => st.setTimeline); + var refreshWorkingTimline = useWorkingTimeline((st: any) => st.refreshLiveTimeline); var setFrame = useFrame((st: any) => st.setFrame); @@ -406,7 +407,7 @@ function TimelineEditor(props: { if (distanceTraveled <= minDistance) setSelectionHidden(true); else { var endingFrame = startingFrame + frameWidth; - var keyframesInSelection = workingTimeline.filter((slide: anySlide) => + var keyframesInSelection = player.timeline.slides.filter((slide: anySlide) => slide.frame >= Math.floor(startingFrame) && slide.frame <= Math.ceil(endingFrame) ); @@ -451,6 +452,7 @@ function TimelineEditor(props: { x: frame, y: event.clientY - window.innerHeight + 210, }; + refreshWorkingTimline(); }} /> <div className='labels' children={timelineLabels} /> |