API change with `focal` option
By default, whenever the focal option was used it disabled animations. It was meant to be used with pinch zooming and mousewheel zooming, which should not animate. However, I've seen some cases where focal has been used and animating is necessary.
Migrating
If you've been using the focal option with the mousewheel, make sure to set animate to false.
$panzoom.parent().on('mousewheel.focal', function( e ) {
e.preventDefault();
var delta = e.delta || e.originalEvent.wheelDelta;
var zoomOut = delta ? delta < 0 : e.originalEvent.deltaY > 0;
$panzoom.panzoom('zoom', zoomOut, {
increment: 0.1,
focal: e,
animate: false
});
});
Aside from this change, the latest updates to panzoom are also really exciting.
- Improved performance across the board. Every panzoom element now has its own compositor layer.
- Improved support for CommonJS loading.