Kaynağa Gözat

Remove zoomDisabled prop; add viewportContent prop

iou90 4 yıl önce
ebeveyn
işleme
05afd8d2ea
2 değiştirilmiş dosya ile 7 ekleme ve 2 silme
  1. 6
    1
      autoHeightWebView/index.js
  2. 1
    1
      index.d.ts

+ 6
- 1
autoHeightWebView/index.js Dosyayı Görüntüle

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

+ 1
- 1
index.d.ts Dosyayı Görüntüle

25
   style: ViewStyle;
25
   style: ViewStyle;
26
   customScript: string;
26
   customScript: string;
27
   customStyle: string;
27
   customStyle: string;
28
-  zoomable: boolean;
28
+  viewportContent: string;
29
   scrollEnabledWithZoomedin: boolean;
29
   scrollEnabledWithZoomedin: boolean;
30
 }
30
 }
31
 
31