Skip to content

Commit

Permalink
Merge pull request #633 from bevuta/bugfix-doubleclickzoom-center-option
Browse files Browse the repository at this point in the history
Add support for doubleClickZoom option's "center" setting
  • Loading branch information
PaulLeCam committed Nov 18, 2019
2 parents 9953fb0 + d77070e commit 3fa0fcd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ export default class Map extends MapEvented<LeafletElement, Props> {
}

if (doubleClickZoom !== fromProps.doubleClickZoom) {
if (doubleClickZoom === true) {
if (doubleClickZoom === true || typeof doubleClickZoom === 'string') {
this.leafletElement.options.doubleClickZoom = doubleClickZoom
this.leafletElement.doubleClickZoom.enable()
} else {
this.leafletElement.doubleClickZoom.disable()
Expand Down

0 comments on commit 3fa0fcd

Please sign in to comment.