question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pan doesn't work without `zoom.enabled`

See original GitHub issue

I need a panning only (without zooming). But if I disable zoom (zoom: {enabled: false}), pan doesn’t work.

If I remove the following lines: https://github.com/chartjs/chartjs-plugin-zoom/blob/d5caf6919b3472f60d66dca1f036178d957e8b8e/src/chart.zoom.js#L347-L349 and add checking if (options.zoom && options.zoom.drag) { instead the following line: https://github.com/chartjs/chartjs-plugin-zoom/blob/d5caf6919b3472f60d66dca1f036178d957e8b8e/src/chart.zoom.js#L350 then pan works without zoom.

Why did you disable pan without zoom? Which problems did you have?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:8
  • Comments:5

github_iconTop GitHub Comments

2reactions
cabal95commented, Jul 14, 2018

As a temporary work around, I set my options like this and it seems to work:

zoom: {
    enabled: true,
    mode: ''
}
0reactions
linzhoulxyzcommented, Feb 22, 2019

As a temporary work around, I set my options like this and it seems to work:

zoom: {
    enabled: true,
    mode: ''
}
zoom: {
  enabled: true,
  drag: true,  
 }

look into source code, this will work fine, and page can scroll too

Read more comments on GitHub >

github_iconTop Results From Across the Web

Panning and zooming in 2D | Maya 2020
Enter the desired values in the Pan and Zoom attributes to move your view horizontally or vertically and zoom into or out of...
Read more >
Zoom or pan the canvas in Motion - Apple Support
Note: Double-clicking the Pan tool resets pan, but not zoom. Click the Zoom Level pop-up menu at the top-right side of the canvas,...
Read more >
Can't Pan Zoomed Out Image (SOLVED!) | Photoshop
Problem: you're trying to pan over an image using the Hand tool. But it only works when you're zoomed in. If you're zoomed...
Read more >
Zebra MC92N0 Screen Panning and Zoom Issues
The zooming does work but it is not consistent with our tests, sometimes we can get it to zoom, others times we can...
Read more >
Disable Pan/Zoom for orthographic cameras - ShapeDiver
I tried disabling panning and zooming under Viewer Settings, with the TOP camera ... If I enable zooming again it again doesn't work:....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found