aboutsummaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2021-06-24 17:30:25 +0200
committerlonkaars <loek@pipeframe.xyz>2021-06-24 17:30:25 +0200
commit32893a65bbf52ecfe390a37642bba505083957d8 (patch)
treedcf97f01f634b20c2cfd2bdcedea034cf64bd1f3 /pages
parenta4dbd32752d2ae28fe7ff58c676905a17b7f3fcd (diff)
selection draggin/modifySlide working again
Diffstat (limited to 'pages')
-rw-r--r--pages/editor.tsx12
1 files changed, 6 insertions, 6 deletions
diff --git a/pages/editor.tsx b/pages/editor.tsx
index 8fcb905..e890d0b 100644
--- a/pages/editor.tsx
+++ b/pages/editor.tsx
@@ -117,7 +117,7 @@ function TimelineKeyframe(props: {
function modifySlide(newProps: Partial<anySlide>) {
var slide = workingTimeline.find(s => s.value.id == props.slide.id);
- slide.set(Object.assign(slide.value, newProps));
+ slide.set(Object.assign({}, slide.value, newProps));
}
var dragRef = useRef(null);
@@ -212,10 +212,10 @@ function TimelineKeyframe(props: {
id={'slide-' + props.slide.id}
ref={mouseUpListener}
>
- <div className='keyframeWrapper posabs abscenterh' style={{ top: spring.y.toJSON() }}>
+ <animated.div className='keyframeWrapper posabs abscenterh' style={{ top: spring.y }}>
{props.slide.type == 'loop'
- ? <div
- style={{ '--begin': spring.begin.toJSON() } as CSSProperties}
+ ? <animated.div
+ style={{ '--begin': spring.begin } as CSSProperties}
className='loop'
>
<span className='dispinbl posabs l0 start' ref={loopStartRef}>
@@ -225,11 +225,11 @@ function TimelineKeyframe(props: {
<span className='dispinbl posabs r0 end' ref={loopEndRef}>
<SlideKeyframe type='loop' loopEnd />
</span>
- </div>
+ </animated.div>
: <span ref={dragRef}>
<SlideKeyframe type={props.slide.type} />
</span>}
- </div>
+ </animated.div>
</animated.div>;
}