Add initial solution for highlighting the keyframe that is being edited in the inline editor popup

This commit is contained in:
Fülöp Kovács 2022-06-08 11:20:12 +02:00 committed by Fülöp
parent a90aee96f5
commit 5ce01e8350

View file

@ -71,7 +71,7 @@ const SingleKeyframeDot: React.VFC<ISingleKeyframeDotProps> = (props) => {
const [ref, node] = useRefAndState<HTMLDivElement | null>(null) const [ref, node] = useRefAndState<HTMLDivElement | null>(null)
const [contextMenu] = useSingleKeyframeContextMenu(node, logger, props) const [contextMenu] = useSingleKeyframeContextMenu(node, logger, props)
const [inlineEditorPopover, openEditor] = const [inlineEditorPopover, openEditor, _, isOpen] =
useSingleKeyframeInlineEditorPopover(props) useSingleKeyframeInlineEditorPopover(props)
const [isDragging] = useDragForSingleKeyframeDot(node, props, { const [isDragging] = useDragForSingleKeyframeDot(node, props, {
onClickFromDrag(dragStartEvent) { onClickFromDrag(dragStartEvent) {
@ -82,7 +82,7 @@ const SingleKeyframeDot: React.VFC<ISingleKeyframeDotProps> = (props) => {
return ( return (
<> <>
<HitZone ref={ref} /> <HitZone ref={ref} />
<Diamond isSelected={!!props.selection} /> <Diamond isSelected={!!props.selection || isOpen} />
{inlineEditorPopover} {inlineEditorPopover}
{contextMenu} {contextMenu}
</> </>