mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
[WebView] Exposed scalesPageToFit UIWebView property
Summary: Added the ``scalesPageToFit`` prop to ``WebView``. This allows ``UIWebView`` to handle user zoom and scale. Closes https://github.com/facebook/react-native/pull/1631 Github Author: alvaromb <amedina@apsl.net> Test Plan: Imported from GitHub, without a `Test Plan:` line.
This commit is contained in:
@@ -95,6 +95,11 @@ var WebView = React.createClass({
|
||||
* Used for android only, JS is enabled by default for WebView on iOS
|
||||
*/
|
||||
javaScriptEnabledAndroid: PropTypes.bool,
|
||||
/**
|
||||
* Used for iOS only, sets whether the webpage scales to fit the view and the
|
||||
* user can change the scale
|
||||
*/
|
||||
scalesPageToFit: PropTypes.bool,
|
||||
},
|
||||
|
||||
getInitialState: function() {
|
||||
@@ -155,6 +160,7 @@ var WebView = React.createClass({
|
||||
onLoadingStart={this.onLoadingStart}
|
||||
onLoadingFinish={this.onLoadingFinish}
|
||||
onLoadingError={this.onLoadingError}
|
||||
scalesPageToFit={this.props.scalesPageToFit}
|
||||
/>;
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user