I'm using panzoom plugin of Timmywil https://github.com/timmywil/jquery.panzoom
in my project. It has been working fine till now. But since chrome's latest update it's broken. It zooms once but if you start panning view is reset to original position. It works with mouse wheel but pinch zoom is not working. This issue appears on chrome version 55 on android mobile. Here is the forked test fiddle link
http://jsfiddle.net/trupti11/c3umpgud/
var $x = $('#x'), $y = $('#y');
var svg = $('svg').on('mousemove', function(e) {
$x.text(e.clientX);
$y.text(e.clientY);
})[0];
var box = svg.getBoundingClientRect();
var $panzoom = $("#viewport").panzoom({
cursor: 'default',
increment: 4,
minScale: 0.5,
maxScale: 16,
rangeStep: 2,
transition: true,
duration: 200,
easing: "ease-in-out",
$zoomIn: $('.zoom-in'),
$zoomOut: $('.zoom-out'),
$zoomRange: $('.zoom-range'),
focal: {
clientX: 108,
clientY: 132
}
});
var instance = $panzoom.panzoom('instance');
instance.parentOffset = { top: 32, left: 8 };
$('#pan').on('click', function(e) {
$panzoom.panzoom('pan', 10, 10, { relative: true, animate: true });
});
I tried updating with the latest plugin files but not change.
Can anyone shed some light?
Here is another demo page which is not working in Android Chrome version 55.