|
@@ -12,7 +12,7 @@ import { reduceData, getWidth, isSizeChanged, shouldUpdate } from './utils';
|
12
|
12
|
|
13
|
13
|
const AutoHeightWebView = React.memo(
|
14
|
14
|
forwardRef((props, ref) => {
|
15
|
|
- const { style, onMessage, onSizeUpdated, scrollableWhenZoomin, scrollEnabled, source } = props;
|
|
15
|
+ const { style, onMessage, onSizeUpdated, scrollEnabledWithZoomedin, scrollEnabled, source } = props;
|
16
|
16
|
|
17
|
17
|
if (!source) {
|
18
|
18
|
return null;
|
|
@@ -46,7 +46,7 @@ const AutoHeightWebView = React.memo(
|
46
|
46
|
return;
|
47
|
47
|
}
|
48
|
48
|
const { height, width, zoomin } = data;
|
49
|
|
- !scrollEnabled && scrollableWhenZoomin && setScrollable(zoomin);
|
|
49
|
+ !scrollEnabled && scrollEnabledWithZoomedin && setScrollable(zoomin);
|
50
|
50
|
const { height: previousHeight, width: previousWidth } = size;
|
51
|
51
|
isSizeChanged({ height, previousHeight, width, previousWidth }) &&
|
52
|
52
|
setSize({
|
|
@@ -54,9 +54,9 @@ const AutoHeightWebView = React.memo(
|
54
|
54
|
width
|
55
|
55
|
});
|
56
|
56
|
};
|
57
|
|
-
|
58
|
|
- const currentScrollEnabled = scrollEnabled === false && scrollableWhenZoomin ? scrollable : scrollEnabled;
|
59
|
|
-
|
|
57
|
+
|
|
58
|
+ const currentScrollEnabled = scrollEnabled === false && scrollEnabledWithZoomedin ? scrollable : scrollEnabled;
|
|
59
|
+
|
60
|
60
|
const { currentSource, script } = reduceData(props);
|
61
|
61
|
|
62
|
62
|
const { width, height } = size;
|
|
@@ -105,7 +105,7 @@ AutoHeightWebView.propTypes = {
|
105
|
105
|
customScript: PropTypes.string,
|
106
|
106
|
customStyle: PropTypes.string,
|
107
|
107
|
zoomable: PropTypes.bool,
|
108
|
|
- scrollableWhenZoomin: PropTypes.bool,
|
|
108
|
+ scrollEnabledWithZoomedin: PropTypes.bool,
|
109
|
109
|
// webview props
|
110
|
110
|
originWhitelist: PropTypes.arrayOf(PropTypes.string),
|
111
|
111
|
onMessage: PropTypes.func,
|