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.

Different maxBoundsViscosity for x and y axes

See original GitHub issue

Would a PR for two additional map options maxBoundsViscosityX and maxBoundsViscosityY that both default to maxBoundsViscosity, if not explicitly set, be accepted?

If x and y are frowned upon, we could also go with maxBoundsViscosityLng and maxBoundsViscosityLat.

In our case, we want to restrict panning to one axis only, but keep the bounciness when reaching the end. Currently this is not possible without also allowing a bit of viscous panning on the other axis.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
IvanSanchezcommented, Mar 29, 2017

Yeah, that’s buried somewhere in the “extending Leaflet” tutorials 😄

I’ll wait for your plugin then 😉

1reaction
IvanSanchezcommented, Mar 29, 2017

Don’t unregister it. Replace the behaviour of L.Map.Drag with L.Map.Drag.include({...});.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation - a JavaScript library for interactive maps
If true , inverses Y axis numbering for tiles (turn this on for TMS services). zoomReverse, Boolean, false, If set to true, the...
Read more >
Leaflet - adjusting improper y axis between zoom levels
I'm currently data mining a game, and I pulled out the in-game map files (and converted to png). The images are 1024x1024 (pixels)....
Read more >
how to set up slider corretly - slidercontrol - Stack Overflow
I have a question about slider implementation for environmental data. I would like to add an icon and by clicking on it, show...
Read more >
Lea et API reference
Other methods. Map Misc. Properties. Panes. UI Layers ... L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png?{foo}', ...
Read more >
leaflet | Yarn - Package Manager
Important: This documentation covers modern versions of Yarn. For 1.x docs, see classic.yarnpkg.com. Yarn.
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