mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 19:26:42 +08:00
fix-next: correct raising of layoutChanged event (#6457)
Currently the layoutChanged event can be raised even when there is no change due to safe area calculations.
This commit is contained in:

committed by
Martin Yankov

parent
745a79f5fa
commit
f5cca13a7c
@ -154,7 +154,8 @@ export class View extends ViewCommon {
|
||||
}
|
||||
|
||||
public _setNativeViewFrame(nativeView: UIView, frame: CGRect): void {
|
||||
if (!CGRectEqualToRect(nativeView.frame, frame)) {
|
||||
let oldFrame = this._cachedFrame || nativeView.frame;
|
||||
if (!CGRectEqualToRect(oldFrame, frame)) {
|
||||
if (traceEnabled()) {
|
||||
traceWrite(this + " :_setNativeViewFrame: " + JSON.stringify(ios.getPositionFromFrame(frame)), traceCategories.Layout);
|
||||
}
|
||||
|
Reference in New Issue
Block a user