From a12ae1c0b72794561d80ffe084b4f3dbf717426b Mon Sep 17 00:00:00 2001 From: lonkaars Date: Sun, 25 Jul 2021 17:15:07 +0200 Subject: css tweaks + code splitting --- pages/editor.tsx | 57 +++++++++----------------------------------------------- 1 file changed, 9 insertions(+), 48 deletions(-) (limited to 'pages') diff --git a/pages/editor.tsx b/pages/editor.tsx index 29e409e..49f3306 100644 --- a/pages/editor.tsx +++ b/pages/editor.tsx @@ -17,7 +17,7 @@ import { import KeybindSelector from '../components/keybindselector'; import PlaySkipIconAni from '../components/play-skip'; import Selection from '../components/selection'; -import TimecodeInput from '../components/timeinput'; +import SlideProperties from '../components/slideprops'; import Project, { arrayBufferToBase64, PresentationSettings, VideoSources, VideoSourceType } from '../project'; import { anySlide, @@ -39,7 +39,6 @@ import MenuItem from '@material-ui/core/MenuItem'; import Select from '@material-ui/core/Select'; import Slider from '@material-ui/core/Slider'; import Switch from '@material-ui/core/Switch'; -import TextField from '@material-ui/core/TextField'; import Toolbar from '@material-ui/core/Toolbar'; import ZoomInRoundedIcon from '@material-ui/icons/ZoomInRounded'; import ZoomOutRoundedIcon from '@material-ui/icons/ZoomOutRounded'; @@ -206,6 +205,8 @@ function select(slides: anySlide[]) { var [startOffset, widthOffset] = calculateSelectionOffsets(left.type, right.type); + // TODO: sometimes has wrong offset when clicking slide + selectionPosAPI[global.selection.hidden.value ? 'set' : 'start']({ y1: 50, y2: 62, @@ -1173,51 +1174,6 @@ function DefaultSettings() { ; } -function SlideProperties(props: { slide: State; }) { - if (props.slide.value.type == 'default') return null; - - return
- Properties - {{ - 'loop': <> - ).frame.get() - - (props.slide as State).beginFrame.get()} - /> - ).beginFrame.get()} - update={newValue => { - (props.slide as State).frame.set(newValue); - global.update.refreshLiveTimeline.value(); - }} - player={player} - /> - ).frame.get()} - update={newValue => { - (props.slide as State).frame.set(newValue); - global.update.refreshLiveTimeline.value(); - }} - player={player} - /> - - , - 'delay': <> - - , - 'speedChange': <> - - - , - }[props.slide.value.type]} -
; -} - function SlideSettings() { var selection = Array.from(useHookstate(global).selection.slides); selection = selection.map(slide => { @@ -1255,8 +1211,13 @@ function SlideSettings() { - {selection.length == 1 && } + {selection.length == 1 && }
+ Behavior Click through behaviour