mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 11:01:21 +08:00
fix(ios): invalid transform if set before any layout (#10675)
[skip ci]
This commit is contained in:

committed by
GitHub

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