A library for panning and zooming elements using CSS transforms
MIT License
Bot releases are hidden (Show)
Published by timmywil about 8 years ago
IE9-11 and Edge 13-14+ do not respect transform values set through CSS. This makes it impossible to use CSS transitions on SVG elements in those browsers.
Nevertheless, why not enable them in the browsers where it works? Chrome, Firefox, and Safari do this just fine.
Published by timmywil about 8 years ago
originalEvent
property got used more often.contain: 'automatic'
option. Greatly simplified contain
option logic in the process.disableXAxis
and disableYAxis
options.panOnlyWhenZoomed
optionexponential
zoom option - Zoom increments exponentially rather than linearly. This is somewhat experimental, but still enabled by default. Linear incrementation was just too slow.backface-visibility:hidden
style to parent to avoid blur on SVG images, but still promote the animation to its own composite layer for optimal performance.input
event. IE11 now uses the change
event fallback.Published by timmywil over 10 years ago
Settings transform styles is not supported in IE. Unfortunately, this means that transitions are not supported for SVG, but transforms work again in all browsers.
See #86.
Published by timmywil over 10 years ago
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.
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.
Published by timmywil over 10 years ago
Published by timmywil over 10 years ago
Published by timmywil almost 11 years ago
This release fixes an issue with focal point zooming when the panzoom element's dimensions differed than its parent.
Published by timmywil about 11 years ago
This option isn't documented, but it's there for super users. An explanation of this option is available in the source.
Published by timmywil about 11 years ago
When the panzoom element was larger than the container, inverted containment was off.
Published by timmywil over 11 years ago
Manifest files are now linted during development.
Published by timmywil over 11 years ago
Imagine your panzoom element is an image tag that spans the entire page. When contain: true
is set, the image can never pan because the image is the same size as its parent. Instead, set contain: invert
when initializing panzoom and you can pan the element whenever it is zoomed in. The image won't pan off-screen and you'll never see anything behind that image.