API Reference / @gtkx/animated / SpringRef
Interface: SpringRef()<State>
Type Parameters
State
SpringRef(
props?):AsyncResult<Controller<State>>[]
Parameters
props?
ControllerUpdate<State, undefined> | ControllerUpdateFn<State>
Returns
AsyncResult<Controller<State>>[]
Properties
current
current:
Controller<State>[]
Methods
_getProps()
_getProps(
arg,ctrl,index):Falsy|ControllerUpdate<State,undefined>
Parameters
arg
ControllerUpdate<State, undefined> | ControllerUpdateFn<State>
ctrl
Controller<State>
index
number
Returns
Falsy | ControllerUpdate<State, undefined>
add()
add(
ctrl):void
Add a controller to this ref
Parameters
ctrl
Controller<State>
Returns
void
delete()
delete(
ctrl):void
Remove a controller from this ref
Parameters
ctrl
Controller<State>
Returns
void
pause()
Call Signature
pause():
this
Pause all animations.
Returns
this
Call Signature
pause(
keys):this
Pause animations for the given keys.
Parameters
keys
OneOrMore<string>
Returns
this
Call Signature
pause(
keys?):this
Pause some or all animations.
Parameters
keys?
OneOrMore<string>
Returns
this
resume()
Call Signature
resume():
this
Resume all animations.
Returns
this
Call Signature
resume(
keys):this
Resume animations for the given keys.
Parameters
keys
OneOrMore<string>
Returns
this
Call Signature
resume(
keys?):this
Resume some or all animations.
Parameters
keys?
OneOrMore<string>
Returns
this
set()
Call Signature
set(
values):void
Update the state of each controller without animating.
Parameters
values
Partial<State>
Returns
void
Call Signature
set(
values):void
Update the state of each controller without animating based on their passed state.
Parameters
values
(index, ctrl) => Partial<State>
Returns
void
start()
Call Signature
start():
AsyncResult<Controller<State>>[]
Start the queued animations of each controller.
Returns
AsyncResult<Controller<State>>[]
Call Signature
start(
props):AsyncResult<Controller<State>>[]
Update every controller with the same props.
Parameters
props
ControllerUpdate<State>
Returns
AsyncResult<Controller<State>>[]
Call Signature
start(
props):AsyncResult<Controller<State>>[]
Update controllers based on their state.
Parameters
props
ControllerUpdateFn<State>
Returns
AsyncResult<Controller<State>>[]
Call Signature
start(
props?):AsyncResult<Controller<State>>[]
Start animating each controller.
Parameters
props?
ControllerUpdate<State, undefined> | ControllerUpdateFn<State>
Returns
AsyncResult<Controller<State>>[]
stop()
Call Signature
stop():
this
Stop all animations.
Returns
this
Call Signature
stop(
keys):this
Stop animations for the given keys.
Parameters
keys
OneOrMore<string>
Returns
this
Call Signature
stop(
cancel):this
Cancel all animations.
Parameters
cancel
boolean
Returns
this
Call Signature
stop(
cancel,keys):this
Cancel animations for the given keys.
Parameters
cancel
boolean
keys
OneOrMore<string>
Returns
this
Call Signature
stop(
keys?):this
Stop some or all animations.
Parameters
keys?
OneOrMore<string>
Returns
this
Call Signature
stop(
cancel,keys?):this
Cancel some or all animations.
Parameters
cancel
boolean
keys?
OneOrMore<string>
Returns
this
update()
Call Signature
update(
props):this
Add the same props to each controller's update queue.
Parameters
props
ControllerUpdate<State>
Returns
this
Call Signature
update(
props):this
Generate separate props for each controller's update queue.
Parameters
props
ControllerUpdateFn<State>
Returns
this
Call Signature
update(
props):this
Add props to each controller's update queue.
Parameters
props
ControllerUpdate<State, undefined> | ControllerUpdateFn<State>
Returns
this