Panzoom: Panning don't work on Chrome

Created on 16 Feb 2017  ·  3Comments  ·  Source: timmywil/panzoom

Subject of the issue

Panning don't work on latest chrome version. On click zoom is set to minimum and panning is set to 0,0.
Into HTML the "transform: matrix" hint disappear.

Your environment

  • version of jquery.panzoom: 3.2.2
  • version of jquery: 1.11.0 (sorry for that)
  • which browser and its version: Chrome 56

Expected behaviour

Panning should working well (perfect into Firefox)

Actual behaviour

Transformation matrix disappear from HTML, zoom is set to minimum and panning go to top left corner

Most helpful comment

Hi,

I don't know if the issue really should be fixed, I know my JQuery version may be responsible.
But the fix is very easy, it just require to use the originalEvent object:

Lines 1204 and 1205:

startPageX = event.originalEvent.pageX;
startPageY = event.originalEvent.pageY;

Lines 1246 to 1250:

self.pan(
    origPageX + coords.originalEvent.pageX - startPageX,
    origPageY + coords.originalEvent.pageY - startPageY,
    panOptions
);

All 3 comments

Hi,

I don't know if the issue really should be fixed, I know my JQuery version may be responsible.
But the fix is very easy, it just require to use the originalEvent object:

Lines 1204 and 1205:

startPageX = event.originalEvent.pageX;
startPageY = event.originalEvent.pageY;

Lines 1246 to 1250:

self.pan(
    origPageX + coords.originalEvent.pageX - startPageX,
    origPageY + coords.originalEvent.pageY - startPageY,
    panOptions
);

I was experiencing the same issue, same jQuery version. changing to a newer version of jQuery does seems to solve the issue. your fix does solve the issue if you need to stay on 1.11.

Hi,

Yes it's possible. I was obliged to stay in that JQuery version.

Thx

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ronvillalon picture ronvillalon  ·  8Comments

YuriGor picture YuriGor  ·  12Comments

nich008 picture nich008  ·  14Comments

adred picture adred  ·  21Comments

kylegoines picture kylegoines  ·  4Comments