hashchange/jquery.documentsize

changing visual viewport by code

Closed this issue · 2 comments

Is there a way to change visual viewport by code?
Thanks

Not that I am aware of. Perhaps you can give it a shot on Stack Overflow, but I wouldn't be too optimistic.

(If you find out about a method that works, it would be great if you can drop me a line here. I don't have tests in place for pinchZoomFactor() for exactly that reason, and I'd probably add a few if there were a way to pinch-zoom programmatically.)

It seems my former self knew more about it than my current self ;) Turns out it is possible after all, and it is in fact used in the test suite. I've just come across the code. I'd assume setMetaViewportZoom() is the function you are looking for. Feel free to copy and use it as you like.