From f8fc90546cd75c271b4d10a5f5a16f26998af645 Mon Sep 17 00:00:00 2001 From: Genki Kondo Date: Wed, 17 Nov 2021 20:33:58 -0800 Subject: [PATCH] Fix reference URLs in Animated Summary: Fix reference URLs in Animated library Changelog: [Internal] Reviewed By: yungsters Differential Revision: D32507849 fbshipit-source-id: ec10202b0f07305e74c787d818fa1f288b775673 --- Libraries/Animated/AnimatedImplementation.js | 46 ++++++++++---------- Libraries/Animated/nodes/AnimatedNode.js | 6 +-- Libraries/Animated/nodes/AnimatedValue.js | 16 +++---- Libraries/Animated/nodes/AnimatedValueXY.js | 24 +++++----- 4 files changed, 46 insertions(+), 46 deletions(-) diff --git a/Libraries/Animated/AnimatedImplementation.js b/Libraries/Animated/AnimatedImplementation.js index 302b14e1c17590..517c7b59ff66a0 100644 --- a/Libraries/Animated/AnimatedImplementation.js +++ b/Libraries/Animated/AnimatedImplementation.js @@ -531,33 +531,33 @@ const event = function ( * If additional transforms are added, be sure to include them in * AnimatedMock.js as well. * - * See https://reactnative.dev/docs/animated.html + * See https://reactnative.dev/docs/animated */ module.exports = { /** * Standard value class for driving animations. Typically initialized with * `new Animated.Value(0);` * - * See https://reactnative.dev/docs/animated.html#value + * See https://reactnative.dev/docs/animated#value */ Value: AnimatedValue, /** * 2D value class for driving 2D animations, such as pan gestures. * - * See https://reactnative.dev/docs/animatedvaluexy.html + * See https://reactnative.dev/docs/animatedvaluexy */ ValueXY: AnimatedValueXY, /** * Exported to use the Interpolation type in flow. * - * See https://reactnative.dev/docs/animated.html#interpolation + * See https://reactnative.dev/docs/animated#interpolation */ Interpolation: AnimatedInterpolation, /** * Exported for ease of type checking. All animated values derive from this * class. * - * See https://reactnative.dev/docs/animated.html#node + * See https://reactnative.dev/docs/animated#node */ Node: AnimatedNode, @@ -565,21 +565,21 @@ module.exports = { * Animates a value from an initial velocity to zero based on a decay * coefficient. * - * See https://reactnative.dev/docs/animated.html#decay + * See https://reactnative.dev/docs/animated#decay */ decay, /** * Animates a value along a timed easing curve. The Easing module has tons of * predefined curves, or you can use your own function. * - * See https://reactnative.dev/docs/animated.html#timing + * See https://reactnative.dev/docs/animated#timing */ timing, /** * Animates a value according to an analytical spring model based on * damped harmonic oscillation. * - * See https://reactnative.dev/docs/animated.html#spring + * See https://reactnative.dev/docs/animated#spring */ spring, @@ -587,7 +587,7 @@ module.exports = { * Creates a new Animated value composed from two Animated values added * together. * - * See https://reactnative.dev/docs/animated.html#add + * See https://reactnative.dev/docs/animated#add */ add, @@ -595,7 +595,7 @@ module.exports = { * Creates a new Animated value composed by subtracting the second Animated * value from the first Animated value. * - * See https://reactnative.dev/docs/animated.html#subtract + * See https://reactnative.dev/docs/animated#subtract */ subtract, @@ -603,7 +603,7 @@ module.exports = { * Creates a new Animated value composed by dividing the first Animated value * by the second Animated value. * - * See https://reactnative.dev/docs/animated.html#divide + * See https://reactnative.dev/docs/animated#divide */ divide, @@ -611,7 +611,7 @@ module.exports = { * Creates a new Animated value composed from two Animated values multiplied * together. * - * See https://reactnative.dev/docs/animated.html#multiply + * See https://reactnative.dev/docs/animated#multiply */ multiply, @@ -619,7 +619,7 @@ module.exports = { * Creates a new Animated value that is the (non-negative) modulo of the * provided Animated value. * - * See https://reactnative.dev/docs/animated.html#modulo + * See https://reactnative.dev/docs/animated#modulo */ modulo, @@ -628,14 +628,14 @@ module.exports = { * difference between the last value so even if the value is far from the * bounds it will start changing when the value starts getting closer again. * - * See https://reactnative.dev/docs/animated.html#diffclamp + * See https://reactnative.dev/docs/animated#diffclamp */ diffClamp, /** * Starts an animation after the given delay. * - * See https://reactnative.dev/docs/animated.html#delay + * See https://reactnative.dev/docs/animated#delay */ delay, /** @@ -643,7 +643,7 @@ module.exports = { * before starting the next. If the current running animation is stopped, no * following animations will be started. * - * See https://reactnative.dev/docs/animated.html#sequence + * See https://reactnative.dev/docs/animated#sequence */ sequence, /** @@ -651,21 +651,21 @@ module.exports = { * of the animations is stopped, they will all be stopped. You can override * this with the `stopTogether` flag. * - * See https://reactnative.dev/docs/animated.html#parallel + * See https://reactnative.dev/docs/animated#parallel */ parallel, /** * Array of animations may run in parallel (overlap), but are started in * sequence with successive delays. Nice for doing trailing effects. * - * See https://reactnative.dev/docs/animated.html#stagger + * See https://reactnative.dev/docs/animated#stagger */ stagger, /** * Loops a given animation continuously, so that each time it reaches the * end, it resets and begins again from the start. * - * See https://reactnative.dev/docs/animated.html#loop + * See https://reactnative.dev/docs/animated#loop */ loop, @@ -673,14 +673,14 @@ module.exports = { * Takes an array of mappings and extracts values from each arg accordingly, * then calls `setValue` on the mapped outputs. * - * See https://reactnative.dev/docs/animated.html#event + * See https://reactnative.dev/docs/animated#event */ event, /** * Make any React component Animatable. Used to create `Animated.View`, etc. * - * See https://reactnative.dev/docs/animated.html#createanimatedcomponent + * See https://reactnative.dev/docs/animated#createanimatedcomponent */ createAnimatedComponent, @@ -688,7 +688,7 @@ module.exports = { * Imperative API to attach an animated value to an event on a view. Prefer * using `Animated.event` with `useNativeDrive: true` if possible. * - * See https://reactnative.dev/docs/animated.html#attachnativeevent + * See https://reactnative.dev/docs/animated#attachnativeevent */ attachNativeEvent, @@ -696,7 +696,7 @@ module.exports = { * Advanced imperative API for snooping on animated events that are passed in * through props. Use values directly where possible. * - * See https://reactnative.dev/docs/animated.html#forkevent + * See https://reactnative.dev/docs/animated#forkevent */ forkEvent, unforkEvent, diff --git a/Libraries/Animated/nodes/AnimatedNode.js b/Libraries/Animated/nodes/AnimatedNode.js index 082f42e5103854..ab371234c27b7e 100644 --- a/Libraries/Animated/nodes/AnimatedNode.js +++ b/Libraries/Animated/nodes/AnimatedNode.js @@ -65,7 +65,7 @@ class AnimatedNode { * animations. This is useful because there is no way to * synchronously read the value because it might be driven natively. * - * See https://reactnative.dev/docs/animatedvalue.html#addlistener + * See https://reactnative.dev/docs/animatedvalue#addlistener */ addListener(callback: (value: any) => mixed): string { const id = String(_uniqueId++); @@ -80,7 +80,7 @@ class AnimatedNode { * Unregister a listener. The `id` param shall match the identifier * previously returned by `addListener()`. * - * See https://reactnative.dev/docs/animatedvalue.html#removelistener + * See https://reactnative.dev/docs/animatedvalue#removelistener */ removeListener(id: string): void { delete this._listeners[id]; @@ -92,7 +92,7 @@ class AnimatedNode { /** * Remove all registered listeners. * - * See https://reactnative.dev/docs/animatedvalue.html#removealllisteners + * See https://reactnative.dev/docs/animatedvalue#removealllisteners */ removeAllListeners(): void { this._listeners = {}; diff --git a/Libraries/Animated/nodes/AnimatedValue.js b/Libraries/Animated/nodes/AnimatedValue.js index 125f78ed88a3ed..1d84f5e01b091c 100644 --- a/Libraries/Animated/nodes/AnimatedValue.js +++ b/Libraries/Animated/nodes/AnimatedValue.js @@ -78,7 +78,7 @@ function _executeAsAnimatedBatch(id: string, operation: () => void) { * mechanism at a time. Using a new mechanism (e.g. starting a new animation, * or calling `setValue`) will stop any previous ones. * - * See https://reactnative.dev/docs/animatedvalue.html + * See https://reactnative.dev/docs/animatedvalue */ class AnimatedValue extends AnimatedWithChildren { _value: number; @@ -115,7 +115,7 @@ class AnimatedValue extends AnimatedWithChildren { * Directly set the value. This will stop any animations running on the value * and update all the bound properties. * - * See https://reactnative.dev/docs/animatedvalue.html#setvalue + * See https://reactnative.dev/docs/animatedvalue#setvalue */ setValue(value: number): void { if (this._animation) { @@ -138,7 +138,7 @@ class AnimatedValue extends AnimatedWithChildren { * `setValue`, an animation, or `Animated.event`. Useful for compensating * things like the start of a pan gesture. * - * See https://reactnative.dev/docs/animatedvalue.html#setoffset + * See https://reactnative.dev/docs/animatedvalue#setoffset */ setOffset(offset: number): void { this._offset = offset; @@ -151,7 +151,7 @@ class AnimatedValue extends AnimatedWithChildren { * Merges the offset value into the base value and resets the offset to zero. * The final output of the value is unchanged. * - * See https://reactnative.dev/docs/animatedvalue.html#flattenoffset + * See https://reactnative.dev/docs/animatedvalue#flattenoffset */ flattenOffset(): void { this._value += this._offset; @@ -165,7 +165,7 @@ class AnimatedValue extends AnimatedWithChildren { * Sets the offset value to the base value, and resets the base value to zero. * The final output of the value is unchanged. * - * See https://reactnative.dev/docs/animatedvalue.html#extractoffset + * See https://reactnative.dev/docs/animatedvalue#extractoffset */ extractOffset(): void { this._offset += this._value; @@ -180,7 +180,7 @@ class AnimatedValue extends AnimatedWithChildren { * final value after stopping the animation, which is useful for updating * state to match the animation position with layout. * - * See https://reactnative.dev/docs/animatedvalue.html#stopanimation + * See https://reactnative.dev/docs/animatedvalue#stopanimation */ stopAnimation(callback?: ?(value: number) => void): void { this.stopTracking(); @@ -192,7 +192,7 @@ class AnimatedValue extends AnimatedWithChildren { /** * Stops any animation and resets the value to its original. * - * See https://reactnative.dev/docs/animatedvalue.html#resetanimation + * See https://reactnative.dev/docs/animatedvalue#resetanimation */ resetAnimation(callback?: ?(value: number) => void): void { this.stopAnimation(callback); @@ -221,7 +221,7 @@ class AnimatedValue extends AnimatedWithChildren { * Typically only used internally, but could be used by a custom Animation * class. * - * See https://reactnative.dev/docs/animatedvalue.html#animate + * See https://reactnative.dev/docs/animatedvalue#animate */ animate(animation: Animation, callback: ?EndCallback): void { let handle = null; diff --git a/Libraries/Animated/nodes/AnimatedValueXY.js b/Libraries/Animated/nodes/AnimatedValueXY.js index 4c0f9e86404cfb..8a4f219c594393 100644 --- a/Libraries/Animated/nodes/AnimatedValueXY.js +++ b/Libraries/Animated/nodes/AnimatedValueXY.js @@ -27,7 +27,7 @@ let _uniqueId = 1; * 2D Value for driving 2D animations, such as pan gestures. Almost identical * API to normal `Animated.Value`, but multiplexed. * - * See https://reactnative.dev/docs/animatedvaluexy.html + * See https://reactnative.dev/docs/animatedvaluexy */ class AnimatedValueXY extends AnimatedWithChildren { x: AnimatedValue; @@ -69,7 +69,7 @@ class AnimatedValueXY extends AnimatedWithChildren { * Directly set the value. This will stop any animations running on the value * and update all the bound properties. * - * See https://reactnative.dev/docs/animatedvaluexy.html#setvalue + * See https://reactnative.dev/docs/animatedvaluexy#setvalue */ setValue(value: {x: number, y: number, ...}) { this.x.setValue(value.x); @@ -81,7 +81,7 @@ class AnimatedValueXY extends AnimatedWithChildren { * via `setValue`, an animation, or `Animated.event`. Useful for compensating * things like the start of a pan gesture. * - * See https://reactnative.dev/docs/animatedvaluexy.html#setoffset + * See https://reactnative.dev/docs/animatedvaluexy#setoffset */ setOffset(offset: {x: number, y: number, ...}) { this.x.setOffset(offset.x); @@ -92,7 +92,7 @@ class AnimatedValueXY extends AnimatedWithChildren { * Merges the offset value into the base value and resets the offset to zero. * The final output of the value is unchanged. * - * See https://reactnative.dev/docs/animatedvaluexy.html#flattenoffset + * See https://reactnative.dev/docs/animatedvaluexy#flattenoffset */ flattenOffset(): void { this.x.flattenOffset(); @@ -103,7 +103,7 @@ class AnimatedValueXY extends AnimatedWithChildren { * Sets the offset value to the base value, and resets the base value to * zero. The final output of the value is unchanged. * - * See https://reactnative.dev/docs/animatedvaluexy.html#extractoffset + * See https://reactnative.dev/docs/animatedvaluexy#extractoffset */ extractOffset(): void { this.x.extractOffset(); @@ -124,7 +124,7 @@ class AnimatedValueXY extends AnimatedWithChildren { /** * Stops any animation and resets the value to its original. * - * See https://reactnative.dev/docs/animatedvaluexy.html#resetanimation + * See https://reactnative.dev/docs/animatedvaluexy#resetanimation */ resetAnimation( callback?: (value: { @@ -143,7 +143,7 @@ class AnimatedValueXY extends AnimatedWithChildren { * final value after stopping the animation, which is useful for updating * state to match the animation position with layout. * - * See https://reactnative.dev/docs/animatedvaluexy.html#stopanimation + * See https://reactnative.dev/docs/animatedvaluexy#stopanimation */ stopAnimation( callback?: (value: { @@ -164,7 +164,7 @@ class AnimatedValueXY extends AnimatedWithChildren { * * Returns a string that serves as an identifier for the listener. * - * See https://reactnative.dev/docs/animatedvaluexy.html#addlistener + * See https://reactnative.dev/docs/animatedvaluexy#addlistener */ addListener(callback: ValueXYListenerCallback): string { const id = String(_uniqueId++); @@ -182,7 +182,7 @@ class AnimatedValueXY extends AnimatedWithChildren { * Unregister a listener. The `id` param shall match the identifier * previously returned by `addListener()`. * - * See https://reactnative.dev/docs/animatedvaluexy.html#removelistener + * See https://reactnative.dev/docs/animatedvaluexy#removelistener */ removeListener(id: string): void { this.x.removeListener(this._listeners[id].x); @@ -193,7 +193,7 @@ class AnimatedValueXY extends AnimatedWithChildren { /** * Remove all registered listeners. * - * See https://reactnative.dev/docs/animatedvaluexy.html#removealllisteners + * See https://reactnative.dev/docs/animatedvaluexy#removealllisteners */ removeAllListeners(): void { this.x.removeAllListeners(); @@ -204,7 +204,7 @@ class AnimatedValueXY extends AnimatedWithChildren { /** * Converts `{x, y}` into `{left, top}` for use in style. * - * See https://reactnative.dev/docs/animatedvaluexy.html#getlayout + * See https://reactnative.dev/docs/animatedvaluexy#getlayout */ getLayout(): {[key: string]: AnimatedValue, ...} { return { @@ -216,7 +216,7 @@ class AnimatedValueXY extends AnimatedWithChildren { /** * Converts `{x, y}` into a useable translation transform. * - * See https://reactnative.dev/docs/animatedvaluexy.html#gettranslatetransform + * See https://reactnative.dev/docs/animatedvaluexy#gettranslatetransform */ getTranslateTransform(): Array<{[key: string]: AnimatedValue, ...}> { return [{translateX: this.x}, {translateY: this.y}];