mirror of
https://github.com/status-im/react-native-webview.git
synced 2026-08-31 11:41:08 +00:00
fix(android:scalesPageToFit): scalesPageToFit does not work as intended , especially for large jpg and png images. (#275)
fixes #113 - One can verify that this for jpg images loaded on the webview (eg: https://www.ecda.gov.sg/growatbeanstalk/PublishingImages/READ%20Publications%20and%20Research/Parent%20Infographic%20Series/Infographic%204.jpg) - This is a replication of the pull request that was originally made in the react-native repo (https://github.com/facebook/react-native/pull/17195), but was not merged in due to no reviews.
This commit is contained in:
committed by
Thibault Malbranche
parent
0e6e92a7f1
commit
a661df1ffc
@@ -562,7 +562,8 @@ public class RNCWebViewManager extends SimpleViewManager<WebView> {
|
||||
|
||||
@ReactProp(name = "scalesPageToFit")
|
||||
public void setScalesPageToFit(WebView view, boolean enabled) {
|
||||
view.getSettings().setUseWideViewPort(!enabled);
|
||||
view.getSettings().setLoadWithOverviewMode(enabled);
|
||||
view.getSettings().setUseWideViewPort(enabled);
|
||||
}
|
||||
|
||||
@ReactProp(name = "domStorageEnabled")
|
||||
|
||||
Reference in New Issue
Block a user