* ui: start highlight ui * ui: tag items * ui: connecting highlights to notes api... * Highlight feature refinements (#2948) * ui: move clips player to foss, connect notes api to hl * ui: tune note/hl editing, prevent zoom slider body from jumping around * ui: safe check for tag * ui: fix thumbnail gen * ui: fix thumbnail gen * ui: make player modal wider, add shadow * ui: custom warn barge for clips * ui: swap icon for note event wrapper * ui: rm other, fix cancel * ui: moving around creation modal * ui: bg tint * ui: rm disabled for text btn * ui: fix ownership sorting * ui: close player on bg click * ui: fix query, fix min distance for default range * ui: move hl list header out of list comp * ui: spot list header segmented size * Various improvements in highlights (#2955) * ui: update hl in hlPanel comp * ui: rm debug * ui: fix icons file --------- Co-authored-by: Sudheer Salavadi <connect.uxmaster@gmail.com>
20 lines
784 B
TypeScript
20 lines
784 B
TypeScript
import React, {useContext} from 'react';
|
|
import {observer} from 'mobx-react-lite';
|
|
import DraggableCircle from 'Components/Session_/Player/Controls/components/DraggableCircle';
|
|
import {PlayerContext} from 'Components/Session/playerContext';
|
|
import TimeTracker from "Components/Session/Player/ClipPlayer/TimeTracker";
|
|
|
|
function TimelineTracker({scale, onDragEnd}: { scale: number, onDragEnd: () => void }) {
|
|
const {store} = useContext(PlayerContext);
|
|
const {time, range} = store.get();
|
|
const adjustedTime = time - range[0];
|
|
|
|
return (
|
|
<>
|
|
<DraggableCircle left={adjustedTime * scale} onDrop={onDragEnd}/>
|
|
<TimeTracker scale={scale} left={(adjustedTime - range[0]) * scale}/>
|
|
</>
|
|
);
|
|
}
|
|
|
|
export default observer(TimelineTracker);
|