File tree Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change 3838
3939 let easingType: string = ' linear'
4040 let easingMode: string | undefined
41- let easingArg: Valuable <number >
41+ let easingArg: Valuable <number > | undefined
4242
4343 function getSelectedEasing() {
4444 if (! selectedKeyframe ?.easing ) return
6767 mode && mode !== ' inout' ? mode [0 ].toUpperCase () + mode .slice (1 ) : ' InOut'
6868 }${type [0 ].toUpperCase () + type .slice (1 )} `
6969 }
70- easingType = type
71- easingMode = mode
72- console .log (selectedKeyframe .easing , easingType , easingMode )
73- if (hasArgs (selectedKeyframe .easing )) {
70+ if (easingType !== type ) {
7471 getEasingArgs ()
7572 }
73+ easingType = type
74+ easingMode = mode
7675 }
7776
7877 let unsub: () => void
7978 function getEasingArgs() {
8079 if (! selectedKeyframe ) return
81- if (selectedKeyframe .easingArgs ) {
82- easingArg = new Valuable (
83- selectedKeyframe .easingArgs [0 ] || getEasingArgDefault (selectedKeyframe ) || 0 ,
84- )
85- } else {
80+ unsub && unsub ()
81+ if (hasArgs (selectedKeyframe .easing )) {
8682 easingArg = new Valuable (getEasingArgDefault (selectedKeyframe ) || 0 )
83+ unsub = easingArg .subscribe (value => setEasingArgs (value ))
84+ } else {
85+ easingArg = undefined
8786 }
88- unsub && unsub ()
89- unsub = easingArg .subscribe (value => setEasingArgs (value ))
9087 }
9188
9289 function setEasingArgs(arg : number ) {
You can’t perform that action at this time.
0 commit comments