leeoniya / leeoniya/uPlot

panning on browser with wheelzoom and mobile pan/zoom at same time

Open
#743 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
10.5k
Forks
463
PR merge metrics
No merged PRs in 30d

Description

Hello,

The wheel zoom plugin in zoom-wheel.html in demos is close to what I'm interested in achieving. It doesn't allow panning on desktop browser using dragging left/right.

As per https://github.com/leeoniya/uPlot/blob/c87cfa3c11aaa078d341d34d6c46826e0372bd0e/demos/zoom-wheel.html#L49-L85

If we make if (e.button==0) instead of if(e.button==1) it seems to work but I need to restrict the min/max from being breached so that only when zoomed in it will allow panning?

Any recommendations for that goal?

Thanks.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue points to demos/zoom-wheel.html, lines 49-85; start there and compare the existing wheel-zoom behavior with the requested desktop dragging and mobile pan/zoom interaction. Done means panning works alongside zooming without breaching the min/max bounds when zoomed in.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.