JimM
JimM

Reputation: 111

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

Upvotes: 5

Views: 2964

Answers (1)

Ferry Kranenburg
Ferry Kranenburg

Reputation: 2635

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.

Upvotes: 4

Related Questions