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

Method _attach

packages/core/src/Interpolation.ts:105–120  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

103
104 // Observe our sources only when we're observed.
105 protected _attach() {
106 let priority = 1
107 each(toArray(this.source), source => {
108 if (hasFluidValue(source)) {
109 addFluidObserver(source, this)
110 }
111 if (isFrameValue(source)) {
112 if (!source.idle) {
113 this._active.add(source)
114 }
115 priority = Math.max(priority, source.priority + 1)
116 }
117 })
118 this.priority = priority
119 this._start()
120 }
121
122 // Stop observing our sources once we have no observers.
123 protected _detach() {

Callers

nothing calls this directly

Calls 7

_startMethod · 0.95
eachFunction · 0.90
toArrayFunction · 0.90
hasFluidValueFunction · 0.90
addFluidObserverFunction · 0.90
isFrameValueFunction · 0.90
addMethod · 0.80

Tested by

no test coverage detected