MCPcopy
hub / github.com/pmndrs/react-spring / stop

Method stop

packages/core/src/Controller.ts:219–231  ·  view source on GitHub ↗

@internal

(arg?: boolean | OneOrMore<string>, keys?: OneOrMore<string>)

Source from the content-addressed store, hash-verified

217 stop(cancel: boolean, keys?: OneOrMore<string>): this
218 /** @internal */
219 stop(arg?: boolean | OneOrMore<string>, keys?: OneOrMore<string>) {
220 if (arg !== !!arg) {
221 keys = arg as OneOrMore<string>
222 }
223 if (keys) {
224 const springs = this.springs as Lookup<SpringValue>
225 each(toArray(keys) as string[], key => springs[key].stop(!!arg))
226 } else {
227 stopAsync(this._state, this._lastAsyncId)
228 this.each(spring => spring.stop(!!arg))
229 }
230 return this
231 }
232
233 /** Freeze the active animation in time */
234 pause(keys?: OneOrMore<string>) {

Callers

nothing calls this directly

Calls 5

eachMethod · 0.95
eachFunction · 0.90
toArrayFunction · 0.90
stopAsyncFunction · 0.90
stopMethod · 0.65

Tested by

no test coverage detected