From c90bf303c1703640554a7145e0f6a4d1058ad744 Mon Sep 17 00:00:00 2001 From: Pieter De Baets Date: Tue, 11 Oct 2016 11:41:30 -0700 Subject: [PATCH] Remove queryLayoutByID Reviewed By: vjeux Differential Revision: D3987495 fbshipit-source-id: 43a3cc0fb9ea718064e59e988619c39a23cd0c38 --- Libraries/Components/Touchable/Touchable.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Libraries/Components/Touchable/Touchable.js b/Libraries/Components/Touchable/Touchable.js index 7e81a1471..811fb4fdf 100644 --- a/Libraries/Components/Touchable/Touchable.js +++ b/Libraries/Components/Touchable/Touchable.js @@ -15,11 +15,11 @@ const BoundingDimensions = require('BoundingDimensions'); const Position = require('Position'); const React = require('React'); // eslint-disable-line no-unused-vars const TouchEventUtils = require('fbjs/lib/TouchEventUtils'); +const UIManager = require('UIManager'); const View = require('View'); const keyMirror = require('fbjs/lib/keyMirror'); const normalizeColor = require('normalizeColor'); -const queryLayoutByID = require('queryLayoutByID'); /** * `Touchable`: Taps done right. @@ -566,11 +566,12 @@ var TouchableMixin = { * @private */ _remeasureMetricsOnActivation: function() { - queryLayoutByID( - this.state.touchable.responderID, - null, - this._handleQueryLayout - ); + const tag = this.state.touchable.responderID; + if (tag == null) { + return; + } + + UIManager.measure(tag, this._handleQueryLayout.bind(this)); }, _handleQueryLayout: function(l, t, w, h, globalX, globalY) {