Browse Source

Remove zoomDisabled prop; add viewportContent prop

iou90 4 years ago
parent
commit
05afd8d2ea
2 changed files with 7 additions and 2 deletions
  1. 6
    1
      autoHeightWebView/index.js
  2. 1
    1
      index.d.ts

+ 6
- 1
autoHeightWebView/index.js View File

@@ -104,7 +104,7 @@ AutoHeightWebView.propTypes = {
104 104
   style: ViewPropTypes.style,
105 105
   customScript: PropTypes.string,
106 106
   customStyle: PropTypes.string,
107
-  zoomDisabled: PropTypes.bool,
107
+  viewportContent: PropTypes.string,
108 108
   scrollEnabledWithZoomedin: PropTypes.bool,
109 109
   // webview props
110 110
   originWhitelist: PropTypes.arrayOf(PropTypes.string),
@@ -124,6 +124,11 @@ Platform.OS === 'android' &&
124 124
     scalesPageToFit: false
125 125
   });
126 126
 
127
+Platform.OS === 'ios' &&
128
+  Object.assign(defaultProps, {
129
+    viewportContent: 'width=device-width'
130
+  });
131
+
127 132
 AutoHeightWebView.defaultProps = defaultProps;
128 133
 
129 134
 const styles = StyleSheet.create({

+ 1
- 1
index.d.ts View File

@@ -25,7 +25,7 @@ export interface AutoHeightWebViewProps extends WebViewProps {
25 25
   style: ViewStyle;
26 26
   customScript: string;
27 27
   customStyle: string;
28
-  zoomable: boolean;
28
+  viewportContent: string;
29 29
   scrollEnabledWithZoomedin: boolean;
30 30
 }
31 31