grinat / leaflet-simple-map-screenshoter

Leaflet plugin which take screenshot of map
MIT License
71 stars 19 forks source link

"hideElementsWithSelectors" doesn't work when passing via "overridePluginOptions" on the takeScreen function #32

Open Hugo01 opened 2 years ago

Hugo01 commented 2 years ago

Using

this.simpleMapScreenshoter.takeScreen('image', {
hideElementsWithSelectors: []
})

"hideElementsWithSelectors" has no effect, the map controls will still be hidden when taking a screenshot But passing on the constructor:

 L.simpleMapScreenshoter({
hideElementsWithSelectors: []
})

Works