Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does one reset the coordinates for panzoom.js?

I'm working on an HTML/css/js program to drag a video to position it and zoom it with the mouse wheel. The program zooms fine in browser screen. But, when I change to full screen, the video creeps up from the cursor when zooming in. How does one reset the coordinates for panzoom.js when going to full screen?

These are the links: Zoom.html and jquery.panzoom.js

like image 545
JimM Avatar asked Sep 29 '22 00:09

JimM


1 Answers

There is an 'reset' option in jquery.panzoom.js. So when going full screen, add this to your BigSmall function:

$('#focal').find('.panzoom').panzoom("reset");

It will then reset the zoom state.

like image 96
Ferry Kranenburg Avatar answered Oct 13 '22 01:10

Ferry Kranenburg