diff options
Diffstat (limited to 'pages')
-rw-r--r-- | pages/editor.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pages/editor.tsx b/pages/editor.tsx index 972c5f4..abb7b5e 100644 --- a/pages/editor.tsx +++ b/pages/editor.tsx @@ -351,6 +351,7 @@ function TimelineEditor(props: { }, []); var [selectionActive, setSelectionActive] = useState(false); + var [selectionPlaced, setSelectionPlaced] = useState(false); var [selectionHidden, setSelectionHidden] = useState(true); var [selectionLeftType, setSelectionLeftType] = useState(null); var [selectionRightType, setSelectionRightType] = useState(null); @@ -375,6 +376,7 @@ function TimelineEditor(props: { if (selectionHidden && distanceTraveled > minDistance) setSelectionHidden(false); if (selectionLeftType) setSelectionLeftType(null); if (selectionRightType) setSelectionRightType(null); + if (selectionPlaced) setSelectionPlaced(false); selectionPosAPI.start({ center: 0, startOffset: 0, @@ -432,6 +434,7 @@ function TimelineEditor(props: { }); setSelectionLeftType(left.type); setSelectionRightType(right.type); + setSelectionPlaced(true); } } }, { domTarget: selectionRef, eventOptions: { passive: false } }); @@ -484,7 +487,7 @@ function TimelineEditor(props: { {workingTimeline.map((slide: anySlide) => <TimelineKeyframe slide={slide} />)} <div id='selection' - className='posabs dispinbl' + className={'posabs dispinbl ' + (selectionPlaced ? 'placed ' : '')} style={{ left: `calc(var(--zoom) * ${selectionPos.startingFrame.toJSON() + selectionPos.center.toJSON()} * 1px - 6px + ${selectionPos.startOffset.toJSON()} * 1px)`, |