Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panning don't work on Chrome #320

Closed
rpallares opened this issue Feb 16, 2017 · 3 comments
Closed

Panning don't work on Chrome #320

rpallares opened this issue Feb 16, 2017 · 3 comments

Comments

@rpallares
Copy link

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

@rpallares
Copy link
Author

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
);

@paramir
Copy link

paramir commented Apr 27, 2017

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.

@rpallares
Copy link
Author

Hi,

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

Thx

@lock lock bot locked as resolved and limited conversation to collaborators Aug 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants