0.10.5: clicking + on an empty button slot moves the editor to that state

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
thandClaude Opus 4.7 committed 2026-04-22 18:55:11 +02:00
1 parent 8895fc76ef
commit d3c5b8b640
3 files changed
+62 -1

No files matched your search

+7
View File
@@ -1251,6 +1251,13 @@ function addKfFromPrev(layerId: string, kfs: Keyframe[], time: number) {
const source = prev ?? next
if (!source) return
store.duplicateKeyframeAt(layerId, source.id, time)
// Move the editor onto the slot we just populated, so the stage reflects it.
if (store.activeButtonAssetId) {
if (Math.abs(time - BUTTON_STATE_TIMES.normal) < 1e-3) store.setActiveButtonState('normal')
else if (Math.abs(time - BUTTON_STATE_TIMES.hover) < 1e-3) store.setActiveButtonState('hover')
else if (Math.abs(time - BUTTON_STATE_TIMES.pressed) < 1e-3) store.setActiveButtonState('pressed')
else if (Math.abs(time - BUTTON_STATE_TIMES.disabled) < 1e-3) store.setActiveButtonState('disabled')
}
}
const EASING_OPTIONS: { value: Easing; label: string }[] = [