8000 Bug: config={'doubleClick': False} does not supress doubleClick for map figures · Issue #5196 · plotly/plotly.py · GitHub
[go: up one dir, main page]

Skip to content

Bug: config={'doubleClick': False} does not supress doubleClick for map figures #5196

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

Open
apberesford opened this issue May 21, 2025 · 1 comment

Comments

@apberesford
Copy link

Some users use fig.show(config={'doubleClick': False}) to supress the default behaviour where double clicking on a figure returns to the default zoom level.

This behaviour is not supressed on map figures, tested on px.choropleth and choropleth_mapbox, plotly==6.0.1.

There does not appear to be a way to supress this behaviour for those maptypes, and there's no relevant error in the terminal to

Example:

ddk.Block(children=[
     ddk.Card(children=ddk.Graph(id='control'),),
     ddk.Card(children=ddk.Graph(id='map'),)
])
@callback(
    Output('control', 'figure'),
    Output('map', 'figure'),
    Input('species', 'value'),
)
def two_figures(species):
    control = px.scatter()
    control.show(config={'doubleClick': False})
    map = px.choropleth_map()
    map.show(config={'doubleClick': False})
    return control, map

returns the following behaviour

Map-Zoom-Recording.mp4
@apberesford
Copy link
Author

Tested for Choropleth specifically because that's the client use case.

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

No branches or pull requests

1 participant
0