How change min and max zoom scale in WKWebView?

ε祈祈猫儿з 提交于 2019-12-04 16:46:11

I know this question is old now but I'm tackling what seems to be a similar problem and thought my solution might help others. I've wrapped the SVG in the following HTML:

<html>
    <head>
        <meta id="mw-viewport" name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1, initial-scale=1.0"/>
    </head>
    <body>
        <svg/>
    </body>
</html>

Once I've calculated my desired min/max zoom levels I execute some javascript to grab the "mw-viewport" meta tag and edit it's "content" attribute's "minimum-scale=1, maximum-scale=1" values.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!