Skip to content

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

Open
@apberesford

Description

@apberesford

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions