Skip to content

Commit

Permalink
Disable world map interactions in non-interactive mode. (#20004)
Browse files Browse the repository at this point in the history
* Disable world map interactions in non-interactive mode.

* Add changelog.
  • Loading branch information
linuspahl authored Jul 24, 2024
1 parent 6d7a6a8 commit 82d6ba5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
4 changes: 4 additions & 0 deletions changelog/unreleased/pr-20004.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
type = "f"
message = "Disable world map interactions in non-interactive mode."

pulls = ["20004"]
Original file line number Diff line number Diff line change
Expand Up @@ -219,18 +219,24 @@ class MapVisualization extends React.Component<MapVisualizationProps> {
{(interactive) => (
<div className={locked ? style.mapLocked : ''} style={{ position: 'relative', zIndex: 0 }}>
{locked && <div className={style.overlay} style={{ height, width }} />}
<MapContainer center={viewport.center}
boundsOptions={{ maxZoom: 19, animate: interactive }}
zoom={viewport.zoom}
<MapContainer boundsOptions={{ maxZoom: 19, animate: interactive }}
center={viewport.center}
className={style.map}
closePopupOnClick={interactive}
doubleClickZoom={interactive}
dragging={interactive}
fadeAnimation={interactive}
key={`visualization-${id}-${width}-${height}`}
id={`visualization-${id}`}
key={`visualization-${id}-${width}-${height}`}
markerZoomAnimation={interactive}
scrollWheelZoom
scrollWheelZoom={interactive}
style={{ height, width }}
touchZoom={interactive}
trackResize={interactive}
whenReady={this._handleMapReady}
zoomAnimation={interactive}>
zoom={viewport.zoom}
zoomAnimation={interactive}
zoomControl={interactive}>
<MapEvents onViewportChanged={onChange} />
<TileLayer url={url} attribution={attribution} eventHandlers={{ load: this._handleTilesReady }} />
{markers}
Expand Down

0 comments on commit 82d6ba5

Please sign in to comment.