diff options
author | lonkaars <loek@pipeframe.xyz> | 2021-05-16 09:32:02 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2021-05-16 09:32:02 +0200 |
commit | 9f5b8d99c34dfea3d1b7321bb1009e5e7e0949e0 (patch) | |
tree | a65a34df64c347e911b1875b89726762f5bb2c3d /pages | |
parent | 6c5787b034db7349d096ec1d2406f72b14efb707 (diff) |
loop keyframe + line in frame
Diffstat (limited to 'pages')
-rw-r--r-- | pages/editor.tsx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/pages/editor.tsx b/pages/editor.tsx index 5c3828d..eb7e14d 100644 --- a/pages/editor.tsx +++ b/pages/editor.tsx @@ -10,6 +10,7 @@ import Toolbar from '@material-ui/core/Toolbar'; import Icon from '@mdi/react'; import { PressureIcon, SlideKeyframe } from '../components/icons'; +import Loop from '../components/loop'; import FullscreenRoundedIcon from '@material-ui/icons/FullscreenRounded'; import NavigateBeforeRoundedIcon from '@material-ui/icons/NavigateBeforeRounded'; @@ -23,6 +24,7 @@ function TimelineEditor(props: { }) { var frames = [...new Array(props.player.timeline?.framecount || 0)].map((el, i) => <div className='frame'> + <div className='line posabs abscenterh b0' /> <span className='timecode numbers posabs abscenterh'> {props.player?.frameToTimestampString(i + 1)} </span> @@ -30,13 +32,11 @@ function TimelineEditor(props: { {(() => { var slide = props.player?.timeline?.slides.find(slide => slide.frame == i + 1); if (slide) { - return <SlideKeyframe type={slide.type} loopEnd />; - } - var loop = props.player?.timeline?.slides.find(slide => - slide.type == 'loop' && (slide as loopSlide).beginFrame == i + 1 - ); - if (loop) { - return <SlideKeyframe type='loop' />; + if (slide.type == 'loop') { + return <Loop length={slide.frame - (slide as loopSlide).beginFrame} />; + } else { + return <SlideKeyframe type={slide.type} />; + } } })()} </div> |