fix(ios): invalid transform if set before any layout (#10675)

[skip ci]
This commit is contained in:
Dimitris-Rafail Katsampas
2025-01-25 21:36:42 +02:00
committed by GitHub
parent 0eb2745589
commit a531232fbb

View File

@ -42,7 +42,6 @@ export class View extends ViewCommon implements ViewDefinition {
private _modalAnimatedOptions: Array<boolean>; private _modalAnimatedOptions: Array<boolean>;
private _isLaidOut = false; private _isLaidOut = false;
private _hasTransform = false; private _hasTransform = false;
private _hasPendingTransform = false;
private _privateFlags: number = PFLAG_LAYOUT_REQUIRED | PFLAG_FORCE_LAYOUT; private _privateFlags: number = PFLAG_LAYOUT_REQUIRED | PFLAG_FORCE_LAYOUT;
private _cachedFrame: CGRect; private _cachedFrame: CGRect;
private _suspendCATransaction = false; private _suspendCATransaction = false;
@ -68,7 +67,6 @@ export class View extends ViewCommon implements ViewDefinition {
this._cachedFrame = null; this._cachedFrame = null;
this._isLaidOut = false; this._isLaidOut = false;
this._hasTransform = false; this._hasTransform = false;
this._hasPendingTransform = false;
} }
public requestLayout(): void { public requestLayout(): void {
@ -140,10 +138,6 @@ export class View extends ViewCommon implements ViewDefinition {
} }
this.updateBackground(sizeChanged, needsLayout); this.updateBackground(sizeChanged, needsLayout);
if (this._hasPendingTransform) {
this.updateNativeTransform();
this._hasPendingTransform = false;
}
this._privateFlags &= ~PFLAG_FORCE_LAYOUT; this._privateFlags &= ~PFLAG_FORCE_LAYOUT;
} }
@ -400,11 +394,6 @@ export class View extends ViewCommon implements ViewDefinition {
} }
public updateNativeTransform() { public updateNativeTransform() {
if (!this.isLayoutValid) {
this._hasPendingTransform = true;
return;
}
const scaleX = this.scaleX || 1e-6; const scaleX = this.scaleX || 1e-6;
const scaleY = this.scaleY || 1e-6; const scaleY = this.scaleY || 1e-6;
const perspective = this.perspective || 300; const perspective = this.perspective || 300;