Edit File by line
/home/barbar84/www/wp-inclu.../js/dist
File: components.js
}
[46000] Fix | Delete
[46001] Fix | Delete
return AnimatedProps;
[46002] Fix | Delete
}(AnimatedObject);
[46003] Fix | Delete
[46004] Fix | Delete
var isFunctionComponent = function isFunctionComponent(val) {
[46005] Fix | Delete
return is.fun(val) && !(val.prototype instanceof React__default.Component);
[46006] Fix | Delete
};
[46007] Fix | Delete
[46008] Fix | Delete
var createAnimatedComponent = function createAnimatedComponent(Component) {
[46009] Fix | Delete
var AnimatedComponent = React.forwardRef(function (props, ref) {
[46010] Fix | Delete
var forceUpdate = useForceUpdate();
[46011] Fix | Delete
var mounted = React.useRef(true);
[46012] Fix | Delete
var propsAnimated = React.useRef(null);
[46013] Fix | Delete
var node = React.useRef(null);
[46014] Fix | Delete
var attachProps = React.useCallback(function (props) {
[46015] Fix | Delete
var oldPropsAnimated = propsAnimated.current;
[46016] Fix | Delete
[46017] Fix | Delete
var callback = function callback() {
[46018] Fix | Delete
var didUpdate = false;
[46019] Fix | Delete
[46020] Fix | Delete
if (node.current) {
[46021] Fix | Delete
didUpdate = applyAnimatedValues.fn(node.current, propsAnimated.current.getAnimatedValue());
[46022] Fix | Delete
}
[46023] Fix | Delete
[46024] Fix | Delete
if (!node.current || didUpdate === false) {
[46025] Fix | Delete
// If no referenced node has been found, or the update target didn't have a
[46026] Fix | Delete
// native-responder, then forceUpdate the animation ...
[46027] Fix | Delete
forceUpdate();
[46028] Fix | Delete
}
[46029] Fix | Delete
};
[46030] Fix | Delete
[46031] Fix | Delete
propsAnimated.current = new AnimatedProps(props, callback);
[46032] Fix | Delete
oldPropsAnimated && oldPropsAnimated.detach();
[46033] Fix | Delete
}, []);
[46034] Fix | Delete
React.useEffect(function () {
[46035] Fix | Delete
return function () {
[46036] Fix | Delete
mounted.current = false;
[46037] Fix | Delete
propsAnimated.current && propsAnimated.current.detach();
[46038] Fix | Delete
};
[46039] Fix | Delete
}, []);
[46040] Fix | Delete
React.useImperativeHandle(ref, function () {
[46041] Fix | Delete
return animatedApi(node, mounted, forceUpdate);
[46042] Fix | Delete
});
[46043] Fix | Delete
attachProps(props);
[46044] Fix | Delete
[46045] Fix | Delete
var _getValue = propsAnimated.current.getValue(),
[46046] Fix | Delete
scrollTop = _getValue.scrollTop,
[46047] Fix | Delete
scrollLeft = _getValue.scrollLeft,
[46048] Fix | Delete
animatedProps = _objectWithoutPropertiesLoose(_getValue, ["scrollTop", "scrollLeft"]); // Functions cannot have refs, see:
[46049] Fix | Delete
// See: https://github.com/react-spring/react-spring/issues/569
[46050] Fix | Delete
[46051] Fix | Delete
[46052] Fix | Delete
var refFn = isFunctionComponent(Component) ? undefined : function (childRef) {
[46053] Fix | Delete
return node.current = handleRef(childRef, ref);
[46054] Fix | Delete
};
[46055] Fix | Delete
return React__default.createElement(Component, _extends({}, animatedProps, {
[46056] Fix | Delete
ref: refFn
[46057] Fix | Delete
}));
[46058] Fix | Delete
});
[46059] Fix | Delete
return AnimatedComponent;
[46060] Fix | Delete
};
[46061] Fix | Delete
[46062] Fix | Delete
var active = false;
[46063] Fix | Delete
var controllers = new Set();
[46064] Fix | Delete
[46065] Fix | Delete
var update = function update() {
[46066] Fix | Delete
if (!active) return false;
[46067] Fix | Delete
var time = now();
[46068] Fix | Delete
[46069] Fix | Delete
for (var _iterator = controllers, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
[46070] Fix | Delete
var _ref;
[46071] Fix | Delete
[46072] Fix | Delete
if (_isArray) {
[46073] Fix | Delete
if (_i >= _iterator.length) break;
[46074] Fix | Delete
_ref = _iterator[_i++];
[46075] Fix | Delete
} else {
[46076] Fix | Delete
_i = _iterator.next();
[46077] Fix | Delete
if (_i.done) break;
[46078] Fix | Delete
_ref = _i.value;
[46079] Fix | Delete
}
[46080] Fix | Delete
[46081] Fix | Delete
var controller = _ref;
[46082] Fix | Delete
var isActive = false;
[46083] Fix | Delete
[46084] Fix | Delete
for (var configIdx = 0; configIdx < controller.configs.length; configIdx++) {
[46085] Fix | Delete
var config = controller.configs[configIdx];
[46086] Fix | Delete
var endOfAnimation = void 0,
[46087] Fix | Delete
lastTime = void 0;
[46088] Fix | Delete
[46089] Fix | Delete
for (var valIdx = 0; valIdx < config.animatedValues.length; valIdx++) {
[46090] Fix | Delete
var animation = config.animatedValues[valIdx]; // If an animation is done, skip, until all of them conclude
[46091] Fix | Delete
[46092] Fix | Delete
if (animation.done) continue;
[46093] Fix | Delete
var from = config.fromValues[valIdx];
[46094] Fix | Delete
var to = config.toValues[valIdx];
[46095] Fix | Delete
var position = animation.lastPosition;
[46096] Fix | Delete
var isAnimated = to instanceof Animated;
[46097] Fix | Delete
var velocity = Array.isArray(config.initialVelocity) ? config.initialVelocity[valIdx] : config.initialVelocity;
[46098] Fix | Delete
if (isAnimated) to = to.getValue(); // Conclude animation if it's either immediate, or from-values match end-state
[46099] Fix | Delete
[46100] Fix | Delete
if (config.immediate) {
[46101] Fix | Delete
animation.setValue(to);
[46102] Fix | Delete
animation.done = true;
[46103] Fix | Delete
continue;
[46104] Fix | Delete
} // Break animation when string values are involved
[46105] Fix | Delete
[46106] Fix | Delete
[46107] Fix | Delete
if (typeof from === 'string' || typeof to === 'string') {
[46108] Fix | Delete
animation.setValue(to);
[46109] Fix | Delete
animation.done = true;
[46110] Fix | Delete
continue;
[46111] Fix | Delete
}
[46112] Fix | Delete
[46113] Fix | Delete
if (config.duration !== void 0) {
[46114] Fix | Delete
/** Duration easing */
[46115] Fix | Delete
position = from + config.easing((time - animation.startTime) / config.duration) * (to - from);
[46116] Fix | Delete
endOfAnimation = time >= animation.startTime + config.duration;
[46117] Fix | Delete
} else if (config.decay) {
[46118] Fix | Delete
/** Decay easing */
[46119] Fix | Delete
position = from + velocity / (1 - 0.998) * (1 - Math.exp(-(1 - 0.998) * (time - animation.startTime)));
[46120] Fix | Delete
endOfAnimation = Math.abs(animation.lastPosition - position) < 0.1;
[46121] Fix | Delete
if (endOfAnimation) to = position;
[46122] Fix | Delete
} else {
[46123] Fix | Delete
/** Spring easing */
[46124] Fix | Delete
lastTime = animation.lastTime !== void 0 ? animation.lastTime : time;
[46125] Fix | Delete
velocity = animation.lastVelocity !== void 0 ? animation.lastVelocity : config.initialVelocity; // If we lost a lot of frames just jump to the end.
[46126] Fix | Delete
[46127] Fix | Delete
if (time > lastTime + 64) lastTime = time; // http://gafferongames.com/game-physics/fix-your-timestep/
[46128] Fix | Delete
[46129] Fix | Delete
var numSteps = Math.floor(time - lastTime);
[46130] Fix | Delete
[46131] Fix | Delete
for (var i = 0; i < numSteps; ++i) {
[46132] Fix | Delete
var force = -config.tension * (position - to);
[46133] Fix | Delete
var damping = -config.friction * velocity;
[46134] Fix | Delete
var acceleration = (force + damping) / config.mass;
[46135] Fix | Delete
velocity = velocity + acceleration * 1 / 1000;
[46136] Fix | Delete
position = position + velocity * 1 / 1000;
[46137] Fix | Delete
} // Conditions for stopping the spring animation
[46138] Fix | Delete
[46139] Fix | Delete
[46140] Fix | Delete
var isOvershooting = config.clamp && config.tension !== 0 ? from < to ? position > to : position < to : false;
[46141] Fix | Delete
var isVelocity = Math.abs(velocity) <= config.precision;
[46142] Fix | Delete
var isDisplacement = config.tension !== 0 ? Math.abs(to - position) <= config.precision : true;
[46143] Fix | Delete
endOfAnimation = isOvershooting || isVelocity && isDisplacement;
[46144] Fix | Delete
animation.lastVelocity = velocity;
[46145] Fix | Delete
animation.lastTime = time;
[46146] Fix | Delete
} // Trails aren't done until their parents conclude
[46147] Fix | Delete
[46148] Fix | Delete
[46149] Fix | Delete
if (isAnimated && !config.toValues[valIdx].done) endOfAnimation = false;
[46150] Fix | Delete
[46151] Fix | Delete
if (endOfAnimation) {
[46152] Fix | Delete
// Ensure that we end up with a round value
[46153] Fix | Delete
if (animation.value !== to) position = to;
[46154] Fix | Delete
animation.done = true;
[46155] Fix | Delete
} else isActive = true;
[46156] Fix | Delete
[46157] Fix | Delete
animation.setValue(position);
[46158] Fix | Delete
animation.lastPosition = position;
[46159] Fix | Delete
} // Keep track of updated values only when necessary
[46160] Fix | Delete
[46161] Fix | Delete
[46162] Fix | Delete
if (controller.props.onFrame) controller.values[config.name] = config.interpolation.getValue();
[46163] Fix | Delete
} // Update callbacks in the end of the frame
[46164] Fix | Delete
[46165] Fix | Delete
[46166] Fix | Delete
if (controller.props.onFrame) controller.props.onFrame(controller.values); // Either call onEnd or next frame
[46167] Fix | Delete
[46168] Fix | Delete
if (!isActive) {
[46169] Fix | Delete
controllers.delete(controller);
[46170] Fix | Delete
controller.stop(true);
[46171] Fix | Delete
}
[46172] Fix | Delete
} // Loop over as long as there are controllers ...
[46173] Fix | Delete
[46174] Fix | Delete
[46175] Fix | Delete
if (controllers.size) {
[46176] Fix | Delete
if (manualFrameloop) manualFrameloop();else requestFrame(update);
[46177] Fix | Delete
} else {
[46178] Fix | Delete
active = false;
[46179] Fix | Delete
}
[46180] Fix | Delete
[46181] Fix | Delete
return active;
[46182] Fix | Delete
};
[46183] Fix | Delete
[46184] Fix | Delete
var start = function start(controller) {
[46185] Fix | Delete
if (!controllers.has(controller)) controllers.add(controller);
[46186] Fix | Delete
[46187] Fix | Delete
if (!active) {
[46188] Fix | Delete
active = true;
[46189] Fix | Delete
if (manualFrameloop) requestFrame(manualFrameloop);else requestFrame(update);
[46190] Fix | Delete
}
[46191] Fix | Delete
};
[46192] Fix | Delete
[46193] Fix | Delete
var stop = function stop(controller) {
[46194] Fix | Delete
if (controllers.has(controller)) controllers.delete(controller);
[46195] Fix | Delete
};
[46196] Fix | Delete
[46197] Fix | Delete
function createInterpolator(range, output, extrapolate) {
[46198] Fix | Delete
if (typeof range === 'function') {
[46199] Fix | Delete
return range;
[46200] Fix | Delete
}
[46201] Fix | Delete
[46202] Fix | Delete
if (Array.isArray(range)) {
[46203] Fix | Delete
return createInterpolator({
[46204] Fix | Delete
range: range,
[46205] Fix | Delete
output: output,
[46206] Fix | Delete
extrapolate: extrapolate
[46207] Fix | Delete
});
[46208] Fix | Delete
}
[46209] Fix | Delete
[46210] Fix | Delete
if (interpolation && typeof range.output[0] === 'string') {
[46211] Fix | Delete
return interpolation(range);
[46212] Fix | Delete
}
[46213] Fix | Delete
[46214] Fix | Delete
var config = range;
[46215] Fix | Delete
var outputRange = config.output;
[46216] Fix | Delete
var inputRange = config.range || [0, 1];
[46217] Fix | Delete
var extrapolateLeft = config.extrapolateLeft || config.extrapolate || 'extend';
[46218] Fix | Delete
var extrapolateRight = config.extrapolateRight || config.extrapolate || 'extend';
[46219] Fix | Delete
[46220] Fix | Delete
var easing = config.easing || function (t) {
[46221] Fix | Delete
return t;
[46222] Fix | Delete
};
[46223] Fix | Delete
[46224] Fix | Delete
return function (input) {
[46225] Fix | Delete
var range = findRange(input, inputRange);
[46226] Fix | Delete
return interpolate(input, inputRange[range], inputRange[range + 1], outputRange[range], outputRange[range + 1], easing, extrapolateLeft, extrapolateRight, config.map);
[46227] Fix | Delete
};
[46228] Fix | Delete
}
[46229] Fix | Delete
[46230] Fix | Delete
function interpolate(input, inputMin, inputMax, outputMin, outputMax, easing, extrapolateLeft, extrapolateRight, map) {
[46231] Fix | Delete
var result = map ? map(input) : input; // Extrapolate
[46232] Fix | Delete
[46233] Fix | Delete
if (result < inputMin) {
[46234] Fix | Delete
if (extrapolateLeft === 'identity') return result;else if (extrapolateLeft === 'clamp') result = inputMin;
[46235] Fix | Delete
}
[46236] Fix | Delete
[46237] Fix | Delete
if (result > inputMax) {
[46238] Fix | Delete
if (extrapolateRight === 'identity') return result;else if (extrapolateRight === 'clamp') result = inputMax;
[46239] Fix | Delete
}
[46240] Fix | Delete
[46241] Fix | Delete
if (outputMin === outputMax) return outputMin;
[46242] Fix | Delete
if (inputMin === inputMax) return input <= inputMin ? outputMin : outputMax; // Input Range
[46243] Fix | Delete
[46244] Fix | Delete
if (inputMin === -Infinity) result = -result;else if (inputMax === Infinity) result = result - inputMin;else result = (result - inputMin) / (inputMax - inputMin); // Easing
[46245] Fix | Delete
[46246] Fix | Delete
result = easing(result); // Output Range
[46247] Fix | Delete
[46248] Fix | Delete
if (outputMin === -Infinity) result = -result;else if (outputMax === Infinity) result = result + outputMin;else result = result * (outputMax - outputMin) + outputMin;
[46249] Fix | Delete
return result;
[46250] Fix | Delete
}
[46251] Fix | Delete
[46252] Fix | Delete
function findRange(input, inputRange) {
[46253] Fix | Delete
for (var i = 1; i < inputRange.length - 1; ++i) {
[46254] Fix | Delete
if (inputRange[i] >= input) break;
[46255] Fix | Delete
}
[46256] Fix | Delete
[46257] Fix | Delete
return i - 1;
[46258] Fix | Delete
}
[46259] Fix | Delete
[46260] Fix | Delete
var AnimatedInterpolation =
[46261] Fix | Delete
/*#__PURE__*/
[46262] Fix | Delete
function (_AnimatedArray) {
[46263] Fix | Delete
_inheritsLoose(AnimatedInterpolation, _AnimatedArray);
[46264] Fix | Delete
[46265] Fix | Delete
function AnimatedInterpolation(parents, range, output, extrapolate) {
[46266] Fix | Delete
var _this;
[46267] Fix | Delete
[46268] Fix | Delete
_this = _AnimatedArray.call(this) || this;
[46269] Fix | Delete
_this.calc = void 0;
[46270] Fix | Delete
_this.payload = parents instanceof AnimatedArray && !(parents instanceof AnimatedInterpolation) ? parents.getPayload() : Array.isArray(parents) ? parents : [parents];
[46271] Fix | Delete
_this.calc = createInterpolator(range, output, extrapolate);
[46272] Fix | Delete
return _this;
[46273] Fix | Delete
}
[46274] Fix | Delete
[46275] Fix | Delete
var _proto = AnimatedInterpolation.prototype;
[46276] Fix | Delete
[46277] Fix | Delete
_proto.getValue = function getValue() {
[46278] Fix | Delete
return this.calc.apply(this, this.payload.map(function (value) {
[46279] Fix | Delete
return value.getValue();
[46280] Fix | Delete
}));
[46281] Fix | Delete
};
[46282] Fix | Delete
[46283] Fix | Delete
_proto.updateConfig = function updateConfig(range, output, extrapolate) {
[46284] Fix | Delete
this.calc = createInterpolator(range, output, extrapolate);
[46285] Fix | Delete
};
[46286] Fix | Delete
[46287] Fix | Delete
_proto.interpolate = function interpolate(range, output, extrapolate) {
[46288] Fix | Delete
return new AnimatedInterpolation(this, range, output, extrapolate);
[46289] Fix | Delete
};
[46290] Fix | Delete
[46291] Fix | Delete
return AnimatedInterpolation;
[46292] Fix | Delete
}(AnimatedArray);
[46293] Fix | Delete
[46294] Fix | Delete
var interpolate$1 = function interpolate(parents, range, output) {
[46295] Fix | Delete
return parents && new AnimatedInterpolation(parents, range, output);
[46296] Fix | Delete
};
[46297] Fix | Delete
[46298] Fix | Delete
var config = {
[46299] Fix | Delete
default: {
[46300] Fix | Delete
tension: 170,
[46301] Fix | Delete
friction: 26
[46302] Fix | Delete
},
[46303] Fix | Delete
gentle: {
[46304] Fix | Delete
tension: 120,
[46305] Fix | Delete
friction: 14
[46306] Fix | Delete
},
[46307] Fix | Delete
wobbly: {
[46308] Fix | Delete
tension: 180,
[46309] Fix | Delete
friction: 12
[46310] Fix | Delete
},
[46311] Fix | Delete
stiff: {
[46312] Fix | Delete
tension: 210,
[46313] Fix | Delete
friction: 20
[46314] Fix | Delete
},
[46315] Fix | Delete
slow: {
[46316] Fix | Delete
tension: 280,
[46317] Fix | Delete
friction: 60
[46318] Fix | Delete
},
[46319] Fix | Delete
molasses: {
[46320] Fix | Delete
tension: 280,
[46321] Fix | Delete
friction: 120
[46322] Fix | Delete
}
[46323] Fix | Delete
};
[46324] Fix | Delete
[46325] Fix | Delete
/** API
[46326] Fix | Delete
* useChain(references, timeSteps, timeFrame)
[46327] Fix | Delete
*/
[46328] Fix | Delete
[46329] Fix | Delete
function useChain(refs, timeSteps, timeFrame) {
[46330] Fix | Delete
if (timeFrame === void 0) {
[46331] Fix | Delete
timeFrame = 1000;
[46332] Fix | Delete
}
[46333] Fix | Delete
[46334] Fix | Delete
var previous = React.useRef();
[46335] Fix | Delete
React.useEffect(function () {
[46336] Fix | Delete
if (is.equ(refs, previous.current)) refs.forEach(function (_ref) {
[46337] Fix | Delete
var current = _ref.current;
[46338] Fix | Delete
return current && current.start();
[46339] Fix | Delete
});else if (timeSteps) {
[46340] Fix | Delete
refs.forEach(function (_ref2, index) {
[46341] Fix | Delete
var current = _ref2.current;
[46342] Fix | Delete
[46343] Fix | Delete
if (current) {
[46344] Fix | Delete
var ctrls = current.controllers;
[46345] Fix | Delete
[46346] Fix | Delete
if (ctrls.length) {
[46347] Fix | Delete
var t = timeFrame * timeSteps[index];
[46348] Fix | Delete
ctrls.forEach(function (ctrl) {
[46349] Fix | Delete
ctrl.queue = ctrl.queue.map(function (e) {
[46350] Fix | Delete
return _extends({}, e, {
[46351] Fix | Delete
delay: e.delay + t
[46352] Fix | Delete
});
[46353] Fix | Delete
});
[46354] Fix | Delete
ctrl.start();
[46355] Fix | Delete
});
[46356] Fix | Delete
}
[46357] Fix | Delete
}
[46358] Fix | Delete
});
[46359] Fix | Delete
} else refs.reduce(function (q, _ref3, rI) {
[46360] Fix | Delete
var current = _ref3.current;
[46361] Fix | Delete
return q = q.then(function () {
[46362] Fix | Delete
return current.start();
[46363] Fix | Delete
});
[46364] Fix | Delete
}, Promise.resolve());
[46365] Fix | Delete
previous.current = refs;
[46366] Fix | Delete
});
[46367] Fix | Delete
}
[46368] Fix | Delete
[46369] Fix | Delete
/**
[46370] Fix | Delete
* Animated works by building a directed acyclic graph of dependencies
[46371] Fix | Delete
* transparently when you render your Animated components.
[46372] Fix | Delete
*
[46373] Fix | Delete
* new Animated.Value(0)
[46374] Fix | Delete
* .interpolate() .interpolate() new Animated.Value(1)
[46375] Fix | Delete
* opacity translateY scale
[46376] Fix | Delete
* style transform
[46377] Fix | Delete
* View#234 style
[46378] Fix | Delete
* View#123
[46379] Fix | Delete
*
[46380] Fix | Delete
* A) Top Down phase
[46381] Fix | Delete
* When an AnimatedValue is updated, we recursively go down through this
[46382] Fix | Delete
* graph in order to find leaf nodes: the views that we flag as needing
[46383] Fix | Delete
* an update.
[46384] Fix | Delete
*
[46385] Fix | Delete
* B) Bottom Up phase
[46386] Fix | Delete
* When a view is flagged as needing an update, we recursively go back up
[46387] Fix | Delete
* in order to build the new value that it needs. The reason why we need
[46388] Fix | Delete
* this two-phases process is to deal with composite props such as
[46389] Fix | Delete
* transform which can receive values from multiple parents.
[46390] Fix | Delete
*/
[46391] Fix | Delete
function addAnimatedStyles(node, styles) {
[46392] Fix | Delete
if ('update' in node) {
[46393] Fix | Delete
styles.add(node);
[46394] Fix | Delete
} else {
[46395] Fix | Delete
node.getChildren().forEach(function (child) {
[46396] Fix | Delete
return addAnimatedStyles(child, styles);
[46397] Fix | Delete
});
[46398] Fix | Delete
}
[46399] Fix | Delete
}
[46400] Fix | Delete
[46401] Fix | Delete
var AnimatedValue =
[46402] Fix | Delete
/*#__PURE__*/
[46403] Fix | Delete
function (_Animated) {
[46404] Fix | Delete
_inheritsLoose(AnimatedValue, _Animated);
[46405] Fix | Delete
[46406] Fix | Delete
function AnimatedValue(_value) {
[46407] Fix | Delete
var _this;
[46408] Fix | Delete
[46409] Fix | Delete
_this = _Animated.call(this) || this;
[46410] Fix | Delete
_this.animatedStyles = new Set();
[46411] Fix | Delete
_this.value = void 0;
[46412] Fix | Delete
_this.startPosition = void 0;
[46413] Fix | Delete
_this.lastPosition = void 0;
[46414] Fix | Delete
_this.lastVelocity = void 0;
[46415] Fix | Delete
_this.startTime = void 0;
[46416] Fix | Delete
_this.lastTime = void 0;
[46417] Fix | Delete
_this.done = false;
[46418] Fix | Delete
[46419] Fix | Delete
_this.setValue = function (value, flush) {
[46420] Fix | Delete
if (flush === void 0) {
[46421] Fix | Delete
flush = true;
[46422] Fix | Delete
}
[46423] Fix | Delete
[46424] Fix | Delete
_this.value = value;
[46425] Fix | Delete
if (flush) _this.flush();
[46426] Fix | Delete
};
[46427] Fix | Delete
[46428] Fix | Delete
_this.value = _value;
[46429] Fix | Delete
_this.startPosition = _value;
[46430] Fix | Delete
_this.lastPosition = _value;
[46431] Fix | Delete
return _this;
[46432] Fix | Delete
}
[46433] Fix | Delete
[46434] Fix | Delete
var _proto = AnimatedValue.prototype;
[46435] Fix | Delete
[46436] Fix | Delete
_proto.flush = function flush() {
[46437] Fix | Delete
if (this.animatedStyles.size === 0) {
[46438] Fix | Delete
addAnimatedStyles(this, this.animatedStyles);
[46439] Fix | Delete
}
[46440] Fix | Delete
[46441] Fix | Delete
this.animatedStyles.forEach(function (animatedStyle) {
[46442] Fix | Delete
return animatedStyle.update();
[46443] Fix | Delete
});
[46444] Fix | Delete
};
[46445] Fix | Delete
[46446] Fix | Delete
_proto.clearStyles = function clearStyles() {
[46447] Fix | Delete
this.animatedStyles.clear();
[46448] Fix | Delete
};
[46449] Fix | Delete
[46450] Fix | Delete
_proto.getValue = function getValue() {
[46451] Fix | Delete
return this.value;
[46452] Fix | Delete
};
[46453] Fix | Delete
[46454] Fix | Delete
_proto.interpolate = function interpolate(range, output, extrapolate) {
[46455] Fix | Delete
return new AnimatedInterpolation(this, range, output, extrapolate);
[46456] Fix | Delete
};
[46457] Fix | Delete
[46458] Fix | Delete
return AnimatedValue;
[46459] Fix | Delete
}(Animated);
[46460] Fix | Delete
[46461] Fix | Delete
var AnimatedValueArray =
[46462] Fix | Delete
/*#__PURE__*/
[46463] Fix | Delete
function (_AnimatedArray) {
[46464] Fix | Delete
_inheritsLoose(AnimatedValueArray, _AnimatedArray);
[46465] Fix | Delete
[46466] Fix | Delete
function AnimatedValueArray(values) {
[46467] Fix | Delete
var _this;
[46468] Fix | Delete
[46469] Fix | Delete
_this = _AnimatedArray.call(this) || this;
[46470] Fix | Delete
_this.payload = values.map(function (n) {
[46471] Fix | Delete
return new AnimatedValue(n);
[46472] Fix | Delete
});
[46473] Fix | Delete
return _this;
[46474] Fix | Delete
}
[46475] Fix | Delete
[46476] Fix | Delete
var _proto = AnimatedValueArray.prototype;
[46477] Fix | Delete
[46478] Fix | Delete
_proto.setValue = function setValue(value, flush) {
[46479] Fix | Delete
var _this2 = this;
[46480] Fix | Delete
[46481] Fix | Delete
if (flush === void 0) {
[46482] Fix | Delete
flush = true;
[46483] Fix | Delete
}
[46484] Fix | Delete
[46485] Fix | Delete
if (Array.isArray(value)) {
[46486] Fix | Delete
if (value.length === this.payload.length) {
[46487] Fix | Delete
value.forEach(function (v, i) {
[46488] Fix | Delete
return _this2.payload[i].setValue(v, flush);
[46489] Fix | Delete
});
[46490] Fix | Delete
}
[46491] Fix | Delete
} else {
[46492] Fix | Delete
this.payload.forEach(function (p) {
[46493] Fix | Delete
return p.setValue(value, flush);
[46494] Fix | Delete
});
[46495] Fix | Delete
}
[46496] Fix | Delete
};
[46497] Fix | Delete
[46498] Fix | Delete
_proto.getValue = function getValue() {
[46499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function