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

No way to disable mouse-scroll zoom for geo subplots #143

Closed
bpostlethwaite opened this issue Dec 23, 2015 · 17 comments
Closed

No way to disable mouse-scroll zoom for geo subplots #143

bpostlethwaite opened this issue Dec 23, 2015 · 17 comments
Assignees
Labels
feature something new
Milestone

Comments

@bpostlethwaite
Copy link
Member

I have heard a few reports of folks struggling to disable mouse-zoom. First stage could be updating our docs to assert that this is currently not supported. Second stage is to support it.

@bpostlethwaite bpostlethwaite added the feature something new label Dec 23, 2015
@etpinard
Copy link
Contributor

We need to better define what layout.dragmode and config.scrollZoom do and how they play together.

@etpinard
Copy link
Contributor

As config.scrollZoom is set to false by default and geo scrolling is enable by default, we can't make config.scrollZoom a geo object option.

I think the solution here would to add an attribute, possibly layout.geo.scrollmode / layout.scene.scrollmode and later move config.scrollZoom to layout.scrollmode for cartesian plots.

@mattfarkas
Copy link

Just wondering if this has been addressed yet. Thanks!

@etpinard
Copy link
Contributor

@mattfarkas No.

@mdfederici
Copy link

It would be nice if scroll zoom was a layout attribute such as dragmode and hovermode. Likewise it would be nice to have an 'after click' event.

My use case is that I have a page with a bunch of plots where I by and large want scroll zoom but only when the user is actually trying ot interact with the chart. I want them to indicate this roughly by clicking on the chart (ie to pan). When this happens, i'd want to toggle scroll zoom on. If i don't do this, the first chart the user wheels over will snipe the events.

@aztlan2k
Copy link

Seems this has been open for almost a year now without any progress having been made on it. I'm just wondering if anyone has started work on it... or - if not - has anyone at least given it some thought to the point where they have an idea what needs to be done?

I may be able to put in some work on this but being new to plotly, i'm not sure what needs to be done. On my initial read-through I thought i new what needed to be done but once I attempted a fix it didn't actually work as expected.

any guidance would be appreciated...

@avnerkantor
Copy link

@aztlan2k
Copy link

@avnerkantor Thanks so much! I actually never came across that. That does resolve my needs.

@bpostlethwaite I wonder if https://plot.ly/javascript/disable-zoom/ is sufficient to close this issue. It allows for the disabling of scroll & zoom on an axis by using the fixedrange attribute of the [xy]axis layout parameter, as can be seen in this example: http://codepen.io/plotly/pen/PZPPPj

It does seem like the fixedrange attribute needs to be documented a bit better though... since i didn't come initially come across it in my search.

@aztlan2k
Copy link

never mind on the documentation... its actually there. don't understand why i personally didn't see it the first time! doh! Thanx again @avnerkantor

@bpostlethwaite
Copy link
Member Author

@etpinard's call on that one

@monfera
Copy link
Contributor

monfera commented Jul 30, 2017

A minor point: setting fixedrange: false still captures the mouse event, and the overall document isn't scrolling when wheeling over a plot, though that's a user expectation with mostly static content.

@etpinard etpinard changed the title No way to disable mouse-scroll zoom No way to disable mouse-scroll zoom for geo subplots Sep 22, 2017
@dancrisan
Copy link

dancrisan commented Apr 25, 2018

This still seems to be an issue, there is no way to disable zoom & pan on geo maps :(

@heisler3030
Copy link

@dancrisan, try using staticPlot: true, this worked for my situation.

https://plot.ly/javascript/configuration-options/#making-a-static-chart

@dancrisan
Copy link

@heisler3030 That unfortunately disables hovering, so you won't be able to see the city names and their value, so not really a working solution =[

@jontay81
Copy link

jontay81 commented May 9, 2018

I'm also interested in a way to disable zoom and pan on chloropleth maps without disabling hover. Right now setting fixedrange to true for both axes doesn't seem to work.

Static Plot works, but I'd like to be able to keep the hover text. If I paste my layout into the the disable zoom codepen, it works. And if I change my plot type to scatter it works. Seems like it's something to do with the geoLayer.

Is there possibly a way to require a ctrl + mouse event to zoom/pan? That may work.

@etpinard
Copy link
Contributor

done in #3422

@yoan13
Copy link

yoan13 commented Jun 4, 2019

Is this feature now available for choropleth maps in the latest plotly.js version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new
Projects
None yet
Development

No branches or pull requests