rowanwins / leaflet-easyPrint

A leaflet plugin which adds an icon to print the map - Demo @ http://rowanwins.github.io/leaflet-easyPrint/
MIT License
248 stars 137 forks source link

Print in 'Current Size' when use vh instead px in the map div #132

Open EdgarCsA opened 1 year ago

EdgarCsA commented 1 year ago

When using "vh" instead "px" in the div height, the Current mode does not work well.

In order to solution, I changed the code

domtoimage.toPng(plugin.mapContainer, {
        width: parseInt(widthForExport),
        height: parseInt(plugin.mapContainer.clientHeight)
      })
GlenLamb commented 1 year ago

would you be able to give me some info on how i can implement this fix in my version, I am getting the problem referenced here: https://github.com/rowanwins/leaflet-easyPrint/issues/76