Skip to content

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

Description

@bpostlethwaite

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.

Activity

  1. etpinard commented on Dec 23, 2015

    @etpinard
    Contributor

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

  2. etpinard commented on Feb 17, 2016

    @etpinard
    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.

  3. mattfarkas commented on Jun 14, 2016

    @mattfarkas

    Just wondering if this has been addressed yet. Thanks!

  4. etpinard commented on Jun 14, 2016

    @etpinard
    Contributor
  5. mdfederici commented on Jun 14, 2016

    @mdfederici

    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.

  6. aztlan2k commented on Dec 12, 2016

    @aztlan2k

    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...

  7. avnerkantor commented on Dec 19, 2016

    @avnerkantor
  8. aztlan2k commented on Dec 19, 2016

    @aztlan2k

    @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.

  9. aztlan2k commented on Dec 19, 2016

    @aztlan2k

    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

  10. bpostlethwaite commented on Dec 19, 2016

    @bpostlethwaite
    MemberAuthor

    @etpinard's call on that one

  11. monfera commented on Jul 30, 2017

    @monfera
    Contributor

    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.

  12. changed the title [-]No way to disable mouse-scroll zoom[/-] [+]No way to disable mouse-scroll zoom for geo subplots[/+] on Sep 22, 2017
  13. dancrisan commented on Apr 25, 2018

    @dancrisan

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

  14. heisler3030 commented on May 4, 2018

    @heisler3030

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

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

  15. dancrisan commented on May 4, 2018

    @dancrisan

    @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 =[

  16. jontay81 commented on May 9, 2018

    @jontay81

    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.

  17. self-assigned this
    on Dec 20, 2018
  18. added this to the 1.44.0 milestone on Jan 4, 2019
  19. added 2 commits that reference this issue on Jan 8, 2019
    b300adb
    b56591d
  20. etpinard commented on Jan 16, 2019

    @etpinard
    Contributor

    done in #3422

  21. yoan13 commented on Jun 4, 2019

    @yoan13

    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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions