Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/renderers/native/NativeMethodsMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
*/
'use strict';

var ReactNative = require('ReactNative');
var ReactNativeAttributePayload = require('ReactNativeAttributePayload');
var TextInputState = require('TextInputState');
var UIManager = require('UIManager');

var findNodeHandle = require('findNodeHandle');
var invariant = require('invariant');

type MeasureOnSuccessCallback = (
Expand Down Expand Up @@ -85,7 +85,7 @@ var NativeMethodsMixin = {
*/
measure: function(callback: MeasureOnSuccessCallback) {
UIManager.measure(
findNodeHandle(this),
ReactNative.findNodeHandle(this),
mountSafeCallback(this, callback)
);
},
Expand All @@ -107,7 +107,7 @@ var NativeMethodsMixin = {
*/
measureInWindow: function(callback: MeasureInWindowOnSuccessCallback) {
UIManager.measureInWindow(
findNodeHandle(this),
ReactNative.findNodeHandle(this),
mountSafeCallback(this, callback)
);
},
Expand All @@ -118,15 +118,15 @@ var NativeMethodsMixin = {
* are relative to the origin x, y of the ancestor view.
*
* As always, to obtain a native node handle for a component, you can use
* `React.findNodeHandle(component)`.
* `ReactNative.findNodeHandle(component)`.
*/
measureLayout: function(
relativeToNativeNode: number,
onSuccess: MeasureLayoutOnSuccessCallback,
onFail: () => void /* currently unused */
) {
UIManager.measureLayout(
findNodeHandle(this),
ReactNative.findNodeHandle(this),
relativeToNativeNode,
mountSafeCallback(this, onFail),
mountSafeCallback(this, onSuccess)
Expand All @@ -150,7 +150,7 @@ var NativeMethodsMixin = {
);

UIManager.updateView(
(findNodeHandle(this) : any),
(ReactNative.findNodeHandle(this) : any),
this.viewConfig.uiViewClassName,
updatePayload
);
Expand All @@ -161,14 +161,14 @@ var NativeMethodsMixin = {
* will depend on the platform and type of view.
*/
focus: function() {
TextInputState.focusTextInput(findNodeHandle(this));
TextInputState.focusTextInput(ReactNative.findNodeHandle(this));
},

/**
* Removes focus from an input or view. This is the opposite of `focus()`.
*/
blur: function() {
TextInputState.blurTextInput(findNodeHandle(this));
TextInputState.blurTextInput(ReactNative.findNodeHandle(this));
},
};

Expand Down