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:
Todor Petrov
2018-10-29 22:13:02 +02:00
committed by dtopuzov
parent 127d6dd104
commit 7f45c0195c
+2 -1
View File
@@ -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);
}