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-26 17:03:23 +03:00
committed by Martin Yankov
parent 745a79f5fa
commit f5cca13a7c

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);
}