Igor-Vladyka / leaflet.browser.print

A leaflet plugin which allows users to print the map directly from the browser
https://igor-vladyka.github.io/leaflet.browser.print/
MIT License
155 stars 76 forks source link

tooltip issue #24

Closed askart closed 6 years ago

askart commented 6 years ago

hi, there! thanks for this lib, it helps a lot After binding tooltips to polygons print can't proceed to the end, and there are no tooltips on polygons.

Igor-Vladyka commented 6 years ago

Hi there,

Could be some internal plugin issue. Can you show me an example of your binding (maybe jsbin or just js code to reproduce this issue)?

Meanwhile, I will take a look on my own.

Regards, Igor

Igor-Vladyka commented 6 years ago

Looks like I found and fixed a problem. Please check latest 0.5.12 version of the plugin.

Regards Igor

askart commented 6 years ago

Thanks, this issue has been resolved, but the problem is, that plugin does not react to toggling tooltips

initially we have something like this: polygon.bindTooltip(polygon.label, {permanent: false, direction: "center", opacity: 1}) init this function after some button clicked: polygon.openTooltip() and print plugin can't see tooltips that are dynamic

if i set permanent to "true", then it will print tooltips

Firstly i'm adding print plugin, then add polygons and tooltips

I've even remove/add plugin after toggling tooltips, but these actions didn't help

Edit: i've solved this by binding and unbinding tooltips with permanent option set to true on button clicked, instead of single binding with permanent option set to false.