web-view
web-view copied to clipboard
How can I allow the user to zoom with the mousewheel and/or ctrl +/-?
I am confused, ctrl +/- by default should zoom in... this should tell you how to use scroll wheel as well
Ctrl +/- does not work, at least not while embedding Youtube it seems. Will try that, thanks.
Wait no, I'm talking about Ctrl+Scroll wheel haha, standard on most browers
Same here, how we can do this, maybe programmatically?
I think that a function like webview.zoom(percentage); would be awesome, how I can do that? there are bindings?
I will look into the docs for winrt webview, gtk webview and cocoa to see if we have a method to implement scale, but until then. You could use javascript.
function zoom(percent) {
document.body.style.zoom = percent+"%";
}
Edit: Do note that this doesnt affect the actual browser scale.
@Blakeinstein this is a different thing, what I need is to zoom the Webkit renderer, is something different, this is surely possible but not exposed by this lib.
I know, thats why I said I would look into said parent libs to see if its possible to implement said feature, i.e. scaling via the renderer programatically.
See https://github.com/webview/webview/pull/482
The original webview project has the zoom functions added in.
@raphtlw done here too :-)