File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { is } from 'shared'
22import {
33 colorNames ,
44 createStringInterpolator ,
5+ forceImmediate ,
56 frameLoop ,
67 now ,
78} from 'shared/globals'
@@ -445,6 +446,10 @@ export class Controller<State extends Indexable = any> {
445446 }
446447 }
447448
449+ if ( forceImmediate ) {
450+ immediate = true
451+ }
452+
448453 if ( reverse ) {
449454 const { to } = props
450455 props . to = props . from
Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ export let colorNames: { [key: string]: number } = {}
3939
4040export let defaultElement : any
4141
42+ export let forceImmediate = false
43+
4244export let createAnimatedStyle : ( ( style : any ) => any ) | undefined
4345
4446export let createAnimatedTransform : ( ( transform : any ) => any ) | undefined
@@ -65,6 +67,7 @@ export interface AnimatedGlobals {
6567 now ?: typeof now
6668 frameLoop ?: typeof frameLoop
6769 colorNames ?: typeof colorNames
70+ forceImmediate ?: typeof forceImmediate
6871 defaultElement ?: typeof defaultElement
6972 applyAnimatedValues ?: typeof applyAnimatedValues
7073 createStringInterpolator ?: typeof createStringInterpolator
@@ -82,6 +85,7 @@ export const assign = (globals: AnimatedGlobals): AnimatedGlobals =>
8285 frameLoop,
8386 colorNames,
8487 defaultElement,
88+ forceImmediate,
8589 applyAnimatedValues,
8690 createStringInterpolator,
8791 createAnimatedInterpolation,
@@ -96,6 +100,7 @@ export const assign = (globals: AnimatedGlobals): AnimatedGlobals =>
96100 frameLoop,
97101 colorNames,
98102 defaultElement,
103+ forceImmediate,
99104 applyAnimatedValues,
100105 createStringInterpolator,
101106 createAnimatedInterpolation,
You can’t perform that action at this time.
0 commit comments