[react_native] JS files from D2038965: Extract view specific commands from UIManager.
This commit is contained in:
parent
d713a711c4
commit
4402c4c885
|
@ -211,11 +211,19 @@ var ScrollView = React.createClass({
|
|||
},
|
||||
|
||||
scrollTo: function(destY?: number, destX?: number) {
|
||||
if (Platform.OS === 'android') {
|
||||
RCTUIManager.dispatchViewManagerCommand(
|
||||
this.getNodeHandle(),
|
||||
RCTUIManager.RCTScrollView.Commands.scrollTo,
|
||||
[destX || 0, destY || 0]
|
||||
);
|
||||
} else {
|
||||
RCTUIManager.scrollTo(
|
||||
this.getNodeHandle(),
|
||||
destX || 0,
|
||||
destY || 0
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
scrollWithoutAnimationTo: function(destY?: number, destX?: number) {
|
||||
|
|
|
@ -109,15 +109,27 @@ var WebView = React.createClass({
|
|||
},
|
||||
|
||||
goForward: function() {
|
||||
RCTUIManager.webViewGoForward(this.getWebWiewHandle());
|
||||
RCTUIManager.dispatchViewManagerCommand(
|
||||
this.getWebWiewHandle(),
|
||||
RCTUIManager.RCTWebView.Commands.goForward,
|
||||
null
|
||||
);
|
||||
},
|
||||
|
||||
goBack: function() {
|
||||
RCTUIManager.webViewGoBack(this.getWebWiewHandle());
|
||||
RCTUIManager.dispatchViewManagerCommand(
|
||||
this.getWebWiewHandle(),
|
||||
RCTUIManager.RCTWebView.Commands.goBack,
|
||||
null
|
||||
);
|
||||
},
|
||||
|
||||
reload: function() {
|
||||
RCTUIManager.webViewReload(this.getWebWiewHandle());
|
||||
RCTUIManager.dispatchViewManagerCommand(
|
||||
this.getWebWiewHandle(),
|
||||
RCTUIManager.RCTWebView.Commands.reload,
|
||||
null
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue