Enable the preview of easing presets when the curveEditorPopover opens
This commit is contained in:
parent
d1ef903355
commit
fb02b297f1
1 changed files with 6 additions and 1 deletions
|
@ -279,8 +279,13 @@ const CurveEditorPopover: React.VFC<ICurveEditorPopoverProps> = (props) => {
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const onEasingOptionMouseOver = (item: {label: string; value: string}) =>
|
const onEasingOptionMouseOver = (item: {label: string; value: string}) => {
|
||||||
|
// Set the `textInputMode` to `auto` if it was `init` before
|
||||||
|
// to enable the easing previews
|
||||||
|
if (textInputMode === TextInputMode.init)
|
||||||
|
setTextInputMode(TextInputMode.auto)
|
||||||
setPreview(item.value)
|
setPreview(item.value)
|
||||||
|
}
|
||||||
const onEasingOptionMouseOut = () => setPreview(null)
|
const onEasingOptionMouseOut = () => setPreview(null)
|
||||||
const onSelectEasingOption = (item: {label: string; value: string}) => {
|
const onSelectEasingOption = (item: {label: string; value: string}) => {
|
||||||
setTempValue(tempTransaction, allConnections, item.value)
|
setTempValue(tempTransaction, allConnections, item.value)
|
||||||
|
|
Loading…
Reference in a new issue