Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-inclu.../js/dist
File: components.js
mixAxisDelta(targetDelta.y, delta.y, progress);
[25000] Fix | Delete
this.setTargetDelta(targetDelta);
[25001] Fix | Delete
if (this.relativeTarget &&
[25002] Fix | Delete
this.relativeTargetOrigin &&
[25003] Fix | Delete
this.layout &&
[25004] Fix | Delete
this.relativeParent &&
[25005] Fix | Delete
this.relativeParent.layout) {
[25006] Fix | Delete
calcRelativePosition(relativeLayout, this.layout.layoutBox, this.relativeParent.layout.layoutBox);
[25007] Fix | Delete
mixBox(this.relativeTarget, this.relativeTargetOrigin, relativeLayout, progress);
[25008] Fix | Delete
/**
[25009] Fix | Delete
* If this is an unchanged relative target we can consider the
[25010] Fix | Delete
* projection not dirty.
[25011] Fix | Delete
*/
[25012] Fix | Delete
if (prevRelativeTarget &&
[25013] Fix | Delete
boxEquals(this.relativeTarget, prevRelativeTarget)) {
[25014] Fix | Delete
this.isProjectionDirty = false;
[25015] Fix | Delete
}
[25016] Fix | Delete
if (!prevRelativeTarget)
[25017] Fix | Delete
prevRelativeTarget = createBox();
[25018] Fix | Delete
copyBoxInto(prevRelativeTarget, this.relativeTarget);
[25019] Fix | Delete
}
[25020] Fix | Delete
if (isSharedLayoutAnimation) {
[25021] Fix | Delete
this.animationValues = mixedValues;
[25022] Fix | Delete
mixValues(mixedValues, snapshotLatestValues, this.latestValues, progress, shouldCrossfadeOpacity, isOnlyMember);
[25023] Fix | Delete
}
[25024] Fix | Delete
this.root.scheduleUpdateProjection();
[25025] Fix | Delete
this.scheduleRender();
[25026] Fix | Delete
this.animationProgress = progress;
[25027] Fix | Delete
};
[25028] Fix | Delete
this.mixTargetDelta(this.options.layoutRoot ? 1000 : 0);
[25029] Fix | Delete
}
[25030] Fix | Delete
startAnimation(options) {
[25031] Fix | Delete
this.notifyListeners("animationStart");
[25032] Fix | Delete
this.currentAnimation && this.currentAnimation.stop();
[25033] Fix | Delete
if (this.resumingFrom && this.resumingFrom.currentAnimation) {
[25034] Fix | Delete
this.resumingFrom.currentAnimation.stop();
[25035] Fix | Delete
}
[25036] Fix | Delete
if (this.pendingAnimation) {
[25037] Fix | Delete
cancelFrame(this.pendingAnimation);
[25038] Fix | Delete
this.pendingAnimation = undefined;
[25039] Fix | Delete
}
[25040] Fix | Delete
/**
[25041] Fix | Delete
* Start the animation in the next frame to have a frame with progress 0,
[25042] Fix | Delete
* where the target is the same as when the animation started, so we can
[25043] Fix | Delete
* calculate the relative positions correctly for instant transitions.
[25044] Fix | Delete
*/
[25045] Fix | Delete
this.pendingAnimation = frame_frame.update(() => {
[25046] Fix | Delete
globalProjectionState.hasAnimatedSinceResize = true;
[25047] Fix | Delete
this.currentAnimation = animateSingleValue(0, animationTarget, {
[25048] Fix | Delete
...options,
[25049] Fix | Delete
onUpdate: (latest) => {
[25050] Fix | Delete
this.mixTargetDelta(latest);
[25051] Fix | Delete
options.onUpdate && options.onUpdate(latest);
[25052] Fix | Delete
},
[25053] Fix | Delete
onComplete: () => {
[25054] Fix | Delete
options.onComplete && options.onComplete();
[25055] Fix | Delete
this.completeAnimation();
[25056] Fix | Delete
},
[25057] Fix | Delete
});
[25058] Fix | Delete
if (this.resumingFrom) {
[25059] Fix | Delete
this.resumingFrom.currentAnimation = this.currentAnimation;
[25060] Fix | Delete
}
[25061] Fix | Delete
this.pendingAnimation = undefined;
[25062] Fix | Delete
});
[25063] Fix | Delete
}
[25064] Fix | Delete
completeAnimation() {
[25065] Fix | Delete
if (this.resumingFrom) {
[25066] Fix | Delete
this.resumingFrom.currentAnimation = undefined;
[25067] Fix | Delete
this.resumingFrom.preserveOpacity = undefined;
[25068] Fix | Delete
}
[25069] Fix | Delete
const stack = this.getStack();
[25070] Fix | Delete
stack && stack.exitAnimationComplete();
[25071] Fix | Delete
this.resumingFrom =
[25072] Fix | Delete
this.currentAnimation =
[25073] Fix | Delete
this.animationValues =
[25074] Fix | Delete
undefined;
[25075] Fix | Delete
this.notifyListeners("animationComplete");
[25076] Fix | Delete
}
[25077] Fix | Delete
finishAnimation() {
[25078] Fix | Delete
if (this.currentAnimation) {
[25079] Fix | Delete
this.mixTargetDelta && this.mixTargetDelta(animationTarget);
[25080] Fix | Delete
this.currentAnimation.stop();
[25081] Fix | Delete
}
[25082] Fix | Delete
this.completeAnimation();
[25083] Fix | Delete
}
[25084] Fix | Delete
applyTransformsToTarget() {
[25085] Fix | Delete
const lead = this.getLead();
[25086] Fix | Delete
let { targetWithTransforms, target, layout, latestValues } = lead;
[25087] Fix | Delete
if (!targetWithTransforms || !target || !layout)
[25088] Fix | Delete
return;
[25089] Fix | Delete
/**
[25090] Fix | Delete
* If we're only animating position, and this element isn't the lead element,
[25091] Fix | Delete
* then instead of projecting into the lead box we instead want to calculate
[25092] Fix | Delete
* a new target that aligns the two boxes but maintains the layout shape.
[25093] Fix | Delete
*/
[25094] Fix | Delete
if (this !== lead &&
[25095] Fix | Delete
this.layout &&
[25096] Fix | Delete
layout &&
[25097] Fix | Delete
shouldAnimatePositionOnly(this.options.animationType, this.layout.layoutBox, layout.layoutBox)) {
[25098] Fix | Delete
target = this.target || createBox();
[25099] Fix | Delete
const xLength = calcLength(this.layout.layoutBox.x);
[25100] Fix | Delete
target.x.min = lead.target.x.min;
[25101] Fix | Delete
target.x.max = target.x.min + xLength;
[25102] Fix | Delete
const yLength = calcLength(this.layout.layoutBox.y);
[25103] Fix | Delete
target.y.min = lead.target.y.min;
[25104] Fix | Delete
target.y.max = target.y.min + yLength;
[25105] Fix | Delete
}
[25106] Fix | Delete
copyBoxInto(targetWithTransforms, target);
[25107] Fix | Delete
/**
[25108] Fix | Delete
* Apply the latest user-set transforms to the targetBox to produce the targetBoxFinal.
[25109] Fix | Delete
* This is the final box that we will then project into by calculating a transform delta and
[25110] Fix | Delete
* applying it to the corrected box.
[25111] Fix | Delete
*/
[25112] Fix | Delete
transformBox(targetWithTransforms, latestValues);
[25113] Fix | Delete
/**
[25114] Fix | Delete
* Update the delta between the corrected box and the final target box, after
[25115] Fix | Delete
* user-set transforms are applied to it. This will be used by the renderer to
[25116] Fix | Delete
* create a transform style that will reproject the element from its layout layout
[25117] Fix | Delete
* into the desired bounding box.
[25118] Fix | Delete
*/
[25119] Fix | Delete
calcBoxDelta(this.projectionDeltaWithTransform, this.layoutCorrected, targetWithTransforms, latestValues);
[25120] Fix | Delete
}
[25121] Fix | Delete
registerSharedNode(layoutId, node) {
[25122] Fix | Delete
if (!this.sharedNodes.has(layoutId)) {
[25123] Fix | Delete
this.sharedNodes.set(layoutId, new NodeStack());
[25124] Fix | Delete
}
[25125] Fix | Delete
const stack = this.sharedNodes.get(layoutId);
[25126] Fix | Delete
stack.add(node);
[25127] Fix | Delete
const config = node.options.initialPromotionConfig;
[25128] Fix | Delete
node.promote({
[25129] Fix | Delete
transition: config ? config.transition : undefined,
[25130] Fix | Delete
preserveFollowOpacity: config && config.shouldPreserveFollowOpacity
[25131] Fix | Delete
? config.shouldPreserveFollowOpacity(node)
[25132] Fix | Delete
: undefined,
[25133] Fix | Delete
});
[25134] Fix | Delete
}
[25135] Fix | Delete
isLead() {
[25136] Fix | Delete
const stack = this.getStack();
[25137] Fix | Delete
return stack ? stack.lead === this : true;
[25138] Fix | Delete
}
[25139] Fix | Delete
getLead() {
[25140] Fix | Delete
var _a;
[25141] Fix | Delete
const { layoutId } = this.options;
[25142] Fix | Delete
return layoutId ? ((_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.lead) || this : this;
[25143] Fix | Delete
}
[25144] Fix | Delete
getPrevLead() {
[25145] Fix | Delete
var _a;
[25146] Fix | Delete
const { layoutId } = this.options;
[25147] Fix | Delete
return layoutId ? (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.prevLead : undefined;
[25148] Fix | Delete
}
[25149] Fix | Delete
getStack() {
[25150] Fix | Delete
const { layoutId } = this.options;
[25151] Fix | Delete
if (layoutId)
[25152] Fix | Delete
return this.root.sharedNodes.get(layoutId);
[25153] Fix | Delete
}
[25154] Fix | Delete
promote({ needsReset, transition, preserveFollowOpacity, } = {}) {
[25155] Fix | Delete
const stack = this.getStack();
[25156] Fix | Delete
if (stack)
[25157] Fix | Delete
stack.promote(this, preserveFollowOpacity);
[25158] Fix | Delete
if (needsReset) {
[25159] Fix | Delete
this.projectionDelta = undefined;
[25160] Fix | Delete
this.needsReset = true;
[25161] Fix | Delete
}
[25162] Fix | Delete
if (transition)
[25163] Fix | Delete
this.setOptions({ transition });
[25164] Fix | Delete
}
[25165] Fix | Delete
relegate() {
[25166] Fix | Delete
const stack = this.getStack();
[25167] Fix | Delete
if (stack) {
[25168] Fix | Delete
return stack.relegate(this);
[25169] Fix | Delete
}
[25170] Fix | Delete
else {
[25171] Fix | Delete
return false;
[25172] Fix | Delete
}
[25173] Fix | Delete
}
[25174] Fix | Delete
resetSkewAndRotation() {
[25175] Fix | Delete
const { visualElement } = this.options;
[25176] Fix | Delete
if (!visualElement)
[25177] Fix | Delete
return;
[25178] Fix | Delete
// If there's no detected skew or rotation values, we can early return without a forced render.
[25179] Fix | Delete
let hasDistortingTransform = false;
[25180] Fix | Delete
/**
[25181] Fix | Delete
* An unrolled check for rotation values. Most elements don't have any rotation and
[25182] Fix | Delete
* skipping the nested loop and new object creation is 50% faster.
[25183] Fix | Delete
*/
[25184] Fix | Delete
const { latestValues } = visualElement;
[25185] Fix | Delete
if (latestValues.z ||
[25186] Fix | Delete
latestValues.rotate ||
[25187] Fix | Delete
latestValues.rotateX ||
[25188] Fix | Delete
latestValues.rotateY ||
[25189] Fix | Delete
latestValues.rotateZ ||
[25190] Fix | Delete
latestValues.skewX ||
[25191] Fix | Delete
latestValues.skewY) {
[25192] Fix | Delete
hasDistortingTransform = true;
[25193] Fix | Delete
}
[25194] Fix | Delete
// If there's no distorting values, we don't need to do any more.
[25195] Fix | Delete
if (!hasDistortingTransform)
[25196] Fix | Delete
return;
[25197] Fix | Delete
const resetValues = {};
[25198] Fix | Delete
if (latestValues.z) {
[25199] Fix | Delete
resetDistortingTransform("z", visualElement, resetValues, this.animationValues);
[25200] Fix | Delete
}
[25201] Fix | Delete
// Check the skew and rotate value of all axes and reset to 0
[25202] Fix | Delete
for (let i = 0; i < transformAxes.length; i++) {
[25203] Fix | Delete
resetDistortingTransform(`rotate${transformAxes[i]}`, visualElement, resetValues, this.animationValues);
[25204] Fix | Delete
resetDistortingTransform(`skew${transformAxes[i]}`, visualElement, resetValues, this.animationValues);
[25205] Fix | Delete
}
[25206] Fix | Delete
// Force a render of this element to apply the transform with all skews and rotations
[25207] Fix | Delete
// set to 0.
[25208] Fix | Delete
visualElement.render();
[25209] Fix | Delete
// Put back all the values we reset
[25210] Fix | Delete
for (const key in resetValues) {
[25211] Fix | Delete
visualElement.setStaticValue(key, resetValues[key]);
[25212] Fix | Delete
if (this.animationValues) {
[25213] Fix | Delete
this.animationValues[key] = resetValues[key];
[25214] Fix | Delete
}
[25215] Fix | Delete
}
[25216] Fix | Delete
// Schedule a render for the next frame. This ensures we won't visually
[25217] Fix | Delete
// see the element with the reset rotate value applied.
[25218] Fix | Delete
visualElement.scheduleRender();
[25219] Fix | Delete
}
[25220] Fix | Delete
getProjectionStyles(styleProp) {
[25221] Fix | Delete
var _a, _b;
[25222] Fix | Delete
if (!this.instance || this.isSVG)
[25223] Fix | Delete
return undefined;
[25224] Fix | Delete
if (!this.isVisible) {
[25225] Fix | Delete
return hiddenVisibility;
[25226] Fix | Delete
}
[25227] Fix | Delete
const styles = {
[25228] Fix | Delete
visibility: "",
[25229] Fix | Delete
};
[25230] Fix | Delete
const transformTemplate = this.getTransformTemplate();
[25231] Fix | Delete
if (this.needsReset) {
[25232] Fix | Delete
this.needsReset = false;
[25233] Fix | Delete
styles.opacity = "";
[25234] Fix | Delete
styles.pointerEvents =
[25235] Fix | Delete
resolveMotionValue(styleProp === null || styleProp === void 0 ? void 0 : styleProp.pointerEvents) || "";
[25236] Fix | Delete
styles.transform = transformTemplate
[25237] Fix | Delete
? transformTemplate(this.latestValues, "")
[25238] Fix | Delete
: "none";
[25239] Fix | Delete
return styles;
[25240] Fix | Delete
}
[25241] Fix | Delete
const lead = this.getLead();
[25242] Fix | Delete
if (!this.projectionDelta || !this.layout || !lead.target) {
[25243] Fix | Delete
const emptyStyles = {};
[25244] Fix | Delete
if (this.options.layoutId) {
[25245] Fix | Delete
emptyStyles.opacity =
[25246] Fix | Delete
this.latestValues.opacity !== undefined
[25247] Fix | Delete
? this.latestValues.opacity
[25248] Fix | Delete
: 1;
[25249] Fix | Delete
emptyStyles.pointerEvents =
[25250] Fix | Delete
resolveMotionValue(styleProp === null || styleProp === void 0 ? void 0 : styleProp.pointerEvents) || "";
[25251] Fix | Delete
}
[25252] Fix | Delete
if (this.hasProjected && !hasTransform(this.latestValues)) {
[25253] Fix | Delete
emptyStyles.transform = transformTemplate
[25254] Fix | Delete
? transformTemplate({}, "")
[25255] Fix | Delete
: "none";
[25256] Fix | Delete
this.hasProjected = false;
[25257] Fix | Delete
}
[25258] Fix | Delete
return emptyStyles;
[25259] Fix | Delete
}
[25260] Fix | Delete
const valuesToRender = lead.animationValues || lead.latestValues;
[25261] Fix | Delete
this.applyTransformsToTarget();
[25262] Fix | Delete
styles.transform = buildProjectionTransform(this.projectionDeltaWithTransform, this.treeScale, valuesToRender);
[25263] Fix | Delete
if (transformTemplate) {
[25264] Fix | Delete
styles.transform = transformTemplate(valuesToRender, styles.transform);
[25265] Fix | Delete
}
[25266] Fix | Delete
const { x, y } = this.projectionDelta;
[25267] Fix | Delete
styles.transformOrigin = `${x.origin * 100}% ${y.origin * 100}% 0`;
[25268] Fix | Delete
if (lead.animationValues) {
[25269] Fix | Delete
/**
[25270] Fix | Delete
* If the lead component is animating, assign this either the entering/leaving
[25271] Fix | Delete
* opacity
[25272] Fix | Delete
*/
[25273] Fix | Delete
styles.opacity =
[25274] Fix | Delete
lead === this
[25275] Fix | Delete
? (_b = (_a = valuesToRender.opacity) !== null && _a !== void 0 ? _a : this.latestValues.opacity) !== null && _b !== void 0 ? _b : 1
[25276] Fix | Delete
: this.preserveOpacity
[25277] Fix | Delete
? this.latestValues.opacity
[25278] Fix | Delete
: valuesToRender.opacityExit;
[25279] Fix | Delete
}
[25280] Fix | Delete
else {
[25281] Fix | Delete
/**
[25282] Fix | Delete
* Or we're not animating at all, set the lead component to its layout
[25283] Fix | Delete
* opacity and other components to hidden.
[25284] Fix | Delete
*/
[25285] Fix | Delete
styles.opacity =
[25286] Fix | Delete
lead === this
[25287] Fix | Delete
? valuesToRender.opacity !== undefined
[25288] Fix | Delete
? valuesToRender.opacity
[25289] Fix | Delete
: ""
[25290] Fix | Delete
: valuesToRender.opacityExit !== undefined
[25291] Fix | Delete
? valuesToRender.opacityExit
[25292] Fix | Delete
: 0;
[25293] Fix | Delete
}
[25294] Fix | Delete
/**
[25295] Fix | Delete
* Apply scale correction
[25296] Fix | Delete
*/
[25297] Fix | Delete
for (const key in scaleCorrectors) {
[25298] Fix | Delete
if (valuesToRender[key] === undefined)
[25299] Fix | Delete
continue;
[25300] Fix | Delete
const { correct, applyTo } = scaleCorrectors[key];
[25301] Fix | Delete
/**
[25302] Fix | Delete
* Only apply scale correction to the value if we have an
[25303] Fix | Delete
* active projection transform. Otherwise these values become
[25304] Fix | Delete
* vulnerable to distortion if the element changes size without
[25305] Fix | Delete
* a corresponding layout animation.
[25306] Fix | Delete
*/
[25307] Fix | Delete
const corrected = styles.transform === "none"
[25308] Fix | Delete
? valuesToRender[key]
[25309] Fix | Delete
: correct(valuesToRender[key], lead);
[25310] Fix | Delete
if (applyTo) {
[25311] Fix | Delete
const num = applyTo.length;
[25312] Fix | Delete
for (let i = 0; i < num; i++) {
[25313] Fix | Delete
styles[applyTo[i]] = corrected;
[25314] Fix | Delete
}
[25315] Fix | Delete
}
[25316] Fix | Delete
else {
[25317] Fix | Delete
styles[key] = corrected;
[25318] Fix | Delete
}
[25319] Fix | Delete
}
[25320] Fix | Delete
/**
[25321] Fix | Delete
* Disable pointer events on follow components. This is to ensure
[25322] Fix | Delete
* that if a follow component covers a lead component it doesn't block
[25323] Fix | Delete
* pointer events on the lead.
[25324] Fix | Delete
*/
[25325] Fix | Delete
if (this.options.layoutId) {
[25326] Fix | Delete
styles.pointerEvents =
[25327] Fix | Delete
lead === this
[25328] Fix | Delete
? resolveMotionValue(styleProp === null || styleProp === void 0 ? void 0 : styleProp.pointerEvents) || ""
[25329] Fix | Delete
: "none";
[25330] Fix | Delete
}
[25331] Fix | Delete
return styles;
[25332] Fix | Delete
}
[25333] Fix | Delete
clearSnapshot() {
[25334] Fix | Delete
this.resumeFrom = this.snapshot = undefined;
[25335] Fix | Delete
}
[25336] Fix | Delete
// Only run on root
[25337] Fix | Delete
resetTree() {
[25338] Fix | Delete
this.root.nodes.forEach((node) => { var _a; return (_a = node.currentAnimation) === null || _a === void 0 ? void 0 : _a.stop(); });
[25339] Fix | Delete
this.root.nodes.forEach(clearMeasurements);
[25340] Fix | Delete
this.root.sharedNodes.clear();
[25341] Fix | Delete
}
[25342] Fix | Delete
};
[25343] Fix | Delete
}
[25344] Fix | Delete
function updateLayout(node) {
[25345] Fix | Delete
node.updateLayout();
[25346] Fix | Delete
}
[25347] Fix | Delete
function notifyLayoutUpdate(node) {
[25348] Fix | Delete
var _a;
[25349] Fix | Delete
const snapshot = ((_a = node.resumeFrom) === null || _a === void 0 ? void 0 : _a.snapshot) || node.snapshot;
[25350] Fix | Delete
if (node.isLead() &&
[25351] Fix | Delete
node.layout &&
[25352] Fix | Delete
snapshot &&
[25353] Fix | Delete
node.hasListeners("didUpdate")) {
[25354] Fix | Delete
const { layoutBox: layout, measuredBox: measuredLayout } = node.layout;
[25355] Fix | Delete
const { animationType } = node.options;
[25356] Fix | Delete
const isShared = snapshot.source !== node.layout.source;
[25357] Fix | Delete
// TODO Maybe we want to also resize the layout snapshot so we don't trigger
[25358] Fix | Delete
// animations for instance if layout="size" and an element has only changed position
[25359] Fix | Delete
if (animationType === "size") {
[25360] Fix | Delete
eachAxis((axis) => {
[25361] Fix | Delete
const axisSnapshot = isShared
[25362] Fix | Delete
? snapshot.measuredBox[axis]
[25363] Fix | Delete
: snapshot.layoutBox[axis];
[25364] Fix | Delete
const length = calcLength(axisSnapshot);
[25365] Fix | Delete
axisSnapshot.min = layout[axis].min;
[25366] Fix | Delete
axisSnapshot.max = axisSnapshot.min + length;
[25367] Fix | Delete
});
[25368] Fix | Delete
}
[25369] Fix | Delete
else if (shouldAnimatePositionOnly(animationType, snapshot.layoutBox, layout)) {
[25370] Fix | Delete
eachAxis((axis) => {
[25371] Fix | Delete
const axisSnapshot = isShared
[25372] Fix | Delete
? snapshot.measuredBox[axis]
[25373] Fix | Delete
: snapshot.layoutBox[axis];
[25374] Fix | Delete
const length = calcLength(layout[axis]);
[25375] Fix | Delete
axisSnapshot.max = axisSnapshot.min + length;
[25376] Fix | Delete
/**
[25377] Fix | Delete
* Ensure relative target gets resized and rerendererd
[25378] Fix | Delete
*/
[25379] Fix | Delete
if (node.relativeTarget && !node.currentAnimation) {
[25380] Fix | Delete
node.isProjectionDirty = true;
[25381] Fix | Delete
node.relativeTarget[axis].max =
[25382] Fix | Delete
node.relativeTarget[axis].min + length;
[25383] Fix | Delete
}
[25384] Fix | Delete
});
[25385] Fix | Delete
}
[25386] Fix | Delete
const layoutDelta = createDelta();
[25387] Fix | Delete
calcBoxDelta(layoutDelta, layout, snapshot.layoutBox);
[25388] Fix | Delete
const visualDelta = createDelta();
[25389] Fix | Delete
if (isShared) {
[25390] Fix | Delete
calcBoxDelta(visualDelta, node.applyTransform(measuredLayout, true), snapshot.measuredBox);
[25391] Fix | Delete
}
[25392] Fix | Delete
else {
[25393] Fix | Delete
calcBoxDelta(visualDelta, layout, snapshot.layoutBox);
[25394] Fix | Delete
}
[25395] Fix | Delete
const hasLayoutChanged = !isDeltaZero(layoutDelta);
[25396] Fix | Delete
let hasRelativeTargetChanged = false;
[25397] Fix | Delete
if (!node.resumeFrom) {
[25398] Fix | Delete
const relativeParent = node.getClosestProjectingParent();
[25399] Fix | Delete
/**
[25400] Fix | Delete
* If the relativeParent is itself resuming from a different element then
[25401] Fix | Delete
* the relative snapshot is not relavent
[25402] Fix | Delete
*/
[25403] Fix | Delete
if (relativeParent && !relativeParent.resumeFrom) {
[25404] Fix | Delete
const { snapshot: parentSnapshot, layout: parentLayout } = relativeParent;
[25405] Fix | Delete
if (parentSnapshot && parentLayout) {
[25406] Fix | Delete
const relativeSnapshot = createBox();
[25407] Fix | Delete
calcRelativePosition(relativeSnapshot, snapshot.layoutBox, parentSnapshot.layoutBox);
[25408] Fix | Delete
const relativeLayout = createBox();
[25409] Fix | Delete
calcRelativePosition(relativeLayout, layout, parentLayout.layoutBox);
[25410] Fix | Delete
if (!boxEqualsRounded(relativeSnapshot, relativeLayout)) {
[25411] Fix | Delete
hasRelativeTargetChanged = true;
[25412] Fix | Delete
}
[25413] Fix | Delete
if (relativeParent.options.layoutRoot) {
[25414] Fix | Delete
node.relativeTarget = relativeLayout;
[25415] Fix | Delete
node.relativeTargetOrigin = relativeSnapshot;
[25416] Fix | Delete
node.relativeParent = relativeParent;
[25417] Fix | Delete
}
[25418] Fix | Delete
}
[25419] Fix | Delete
}
[25420] Fix | Delete
}
[25421] Fix | Delete
node.notifyListeners("didUpdate", {
[25422] Fix | Delete
layout,
[25423] Fix | Delete
snapshot,
[25424] Fix | Delete
delta: visualDelta,
[25425] Fix | Delete
layoutDelta,
[25426] Fix | Delete
hasLayoutChanged,
[25427] Fix | Delete
hasRelativeTargetChanged,
[25428] Fix | Delete
});
[25429] Fix | Delete
}
[25430] Fix | Delete
else if (node.isLead()) {
[25431] Fix | Delete
const { onExitComplete } = node.options;
[25432] Fix | Delete
onExitComplete && onExitComplete();
[25433] Fix | Delete
}
[25434] Fix | Delete
/**
[25435] Fix | Delete
* Clearing transition
[25436] Fix | Delete
* TODO: Investigate why this transition is being passed in as {type: false } from Framer
[25437] Fix | Delete
* and why we need it at all
[25438] Fix | Delete
*/
[25439] Fix | Delete
node.options.transition = undefined;
[25440] Fix | Delete
}
[25441] Fix | Delete
function propagateDirtyNodes(node) {
[25442] Fix | Delete
/**
[25443] Fix | Delete
* Increase debug counter for nodes encountered this frame
[25444] Fix | Delete
*/
[25445] Fix | Delete
projectionFrameData.totalNodes++;
[25446] Fix | Delete
if (!node.parent)
[25447] Fix | Delete
return;
[25448] Fix | Delete
/**
[25449] Fix | Delete
* If this node isn't projecting, propagate isProjectionDirty. It will have
[25450] Fix | Delete
* no performance impact but it will allow the next child that *is* projecting
[25451] Fix | Delete
* but *isn't* dirty to just check its parent to see if *any* ancestor needs
[25452] Fix | Delete
* correcting.
[25453] Fix | Delete
*/
[25454] Fix | Delete
if (!node.isProjecting()) {
[25455] Fix | Delete
node.isProjectionDirty = node.parent.isProjectionDirty;
[25456] Fix | Delete
}
[25457] Fix | Delete
/**
[25458] Fix | Delete
* Propagate isSharedProjectionDirty and isTransformDirty
[25459] Fix | Delete
* throughout the whole tree. A future revision can take another look at
[25460] Fix | Delete
* this but for safety we still recalcualte shared nodes.
[25461] Fix | Delete
*/
[25462] Fix | Delete
node.isSharedProjectionDirty || (node.isSharedProjectionDirty = Boolean(node.isProjectionDirty ||
[25463] Fix | Delete
node.parent.isProjectionDirty ||
[25464] Fix | Delete
node.parent.isSharedProjectionDirty));
[25465] Fix | Delete
node.isTransformDirty || (node.isTransformDirty = node.parent.isTransformDirty);
[25466] Fix | Delete
}
[25467] Fix | Delete
function cleanDirtyNodes(node) {
[25468] Fix | Delete
node.isProjectionDirty =
[25469] Fix | Delete
node.isSharedProjectionDirty =
[25470] Fix | Delete
node.isTransformDirty =
[25471] Fix | Delete
false;
[25472] Fix | Delete
}
[25473] Fix | Delete
function clearSnapshot(node) {
[25474] Fix | Delete
node.clearSnapshot();
[25475] Fix | Delete
}
[25476] Fix | Delete
function clearMeasurements(node) {
[25477] Fix | Delete
node.clearMeasurements();
[25478] Fix | Delete
}
[25479] Fix | Delete
function clearIsLayoutDirty(node) {
[25480] Fix | Delete
node.isLayoutDirty = false;
[25481] Fix | Delete
}
[25482] Fix | Delete
function resetTransformStyle(node) {
[25483] Fix | Delete
const { visualElement } = node.options;
[25484] Fix | Delete
if (visualElement && visualElement.getProps().onBeforeLayoutMeasure) {
[25485] Fix | Delete
visualElement.notify("BeforeLayoutMeasure");
[25486] Fix | Delete
}
[25487] Fix | Delete
node.resetTransform();
[25488] Fix | Delete
}
[25489] Fix | Delete
function finishAnimation(node) {
[25490] Fix | Delete
node.finishAnimation();
[25491] Fix | Delete
node.targetDelta = node.relativeTarget = node.target = undefined;
[25492] Fix | Delete
node.isProjectionDirty = true;
[25493] Fix | Delete
}
[25494] Fix | Delete
function resolveTargetDelta(node) {
[25495] Fix | Delete
node.resolveTargetDelta();
[25496] Fix | Delete
}
[25497] Fix | Delete
function calcProjection(node) {
[25498] Fix | Delete
node.calcProjection();
[25499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function