Only send layout update operation to nativehierarchymanager when layout actually changes.

Reviewed By: andreicoman11

Differential Revision: D2679408

fb-gh-sync-id: 7f0a972e9e12f70402e2d285edef458a61ca1c39
This commit is contained in:
Krzysztof Magiera
2015-11-20 07:54:43 -08:00
committed by facebook-github-bot-9
parent 06e514076b
commit 0c8850f3a7
2 changed files with 28 additions and 22 deletions

View File

@@ -814,18 +814,8 @@ public class UIManagerModule extends ReactContextBaseJavaModule implements
absoluteX,
absoluteY,
mOperationsQueue,
mNativeViewHierarchyOptimizer);
// notify JS about layout event if requested
if (cssNode.shouldNotifyOnLayout()) {
mEventDispatcher.dispatchEvent(
OnLayoutEvent.obtain(
tag,
cssNode.getScreenX(),
cssNode.getScreenY(),
cssNode.getScreenWidth(),
cssNode.getScreenHeight()));
}
mNativeViewHierarchyOptimizer,
mEventDispatcher);
}
cssNode.markUpdateSeen();
}