From 64aba383d6fbfa46fa558616c8bce868923d98a3 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Wed, 16 Jun 2021 15:44:37 +0200 Subject: added placed class to #selection --- pages/editor.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pages/editor.tsx') 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) => )}