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.

Support a pan min offset / distance

See original GitHub issue

Subject of the issue

I’d like to be able to configure an offset or distance within which a pan doesn’t start. Typically when dragging there is a margin of error to distinguish between a press (with wiggle) and a drag which tends to be implemented as a minimum distance a drag must move before recognising the event as a drag instead of a blurry press.

Your environment

  • Version of panzoom: 4.0
  • Browser and browser version: Google Chrome | 79.0.3945.117 (Official Build) (64-bit) (cohort: Stable)

Expected behaviour

  1. Configure panzoom with an option like minPanDistance: 5
  2. When panning, don’t start the pan action until the mouse/pointer has moved by 5 pixels
  3. After the 5px threshold distance has been passed continue the pan as if the threshold didn’t exist - i.e. if the distance is 6px then the pan should be 6px and not 1px (6px - 5px)

Actual behaviour

No option exists, the pan begins immediately. This can cause UX issue when clicking or tapping on buttons/elements that are within the pan area as they can move unintentionally.

Steps to reproduce

This is a new feature, it can always be reproduced.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:13
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mattnathancommented, Feb 6, 2020

@timmywil I forked and applied the change I needed. I’ve created a PR which works for my application, whether it’s the correct way to do it for this project I don’t know. Hopefully it’ll help get the feature landed here anyway.

0reactions
timmywilcommented, Feb 5, 2020

Sorry I didn’t get back right away. There’s not really a set time on how long a feature can be collecting interest. That said, while this feature only has 2 votes, it has the most of the 3 features in the list so far. I’m not opposed to doing it, but I probably won’t have time in the near future. If you want to fork and fix, that could be the start of a PR! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

determination of the offset distance between driveway exits ...
The study focused on developing the guideline of the minimum distance for vehicles weave from freeway exit ramp to the first driveway based...
Read more >
600 - Roadside Design | Ohio Department of Transportation
A minimum operational offset of 1.5' (3' at intersections) is required to be provided from the face of curb to accommodate turning trucks...
Read more >
Pan map by pixel (offset map centering) - Esri Community
I would like to offset the map recentering by x number of pixels. How can I do this. map.centerAt(point) - The argument takes...
Read more >
TRAFFIC SAFETY SYSTEMS GUIDANCE - Caltrans
For new installations of thrie beam bar rier, a minimum distance of 17 feet between the face of rail and the edge of...
Read more >
Driven Point (Sand-point) Wells - Wisconsin DNR
Above-ground discharge protected with insulated enclosure for all season operation. Drive point. Ground surface. 12"min. Pump base support mounting. Concrete.
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