Skip to content

Instantly share code, notes, and snippets.

@Kernald
Forked from dridk/customWebView.js
Last active December 16, 2015 18:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kernald/5477304 to your computer and use it in GitHub Desktop.
Save Kernald/5477304 to your computer and use it in GitHub Desktop.
ScrollView {
scrollViewProperties.pinchToZoomEnabled: true
scrollViewProperties.initialScalingMethod: ScalingMethod.AspectFit
scrollViewProperties.minContentScale: 1
scrollViewProperties.maxContentScale: 10
scrollViewProperties.scrollMode: ScrollMode.Both
onContentScaleChanged: {
webView.settings.viewport = {
"initial-scale": scale
}
}
WebView {
id: webView
settings.viewport: {
"initial-scale": 1.0
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment