Closed nrakochy closed 4 years ago
Hi,
So basically you are using custom logic to activate print functionaity, right? If that is the case:
If you need to attach logic that is depends on some map events, as in your example, you can duplicate it directly on print map within the browser-print-start event.
Example:
map.on(L.Control.BrowserPrint.Event.PrintStart, function(obj) {
obj.map.on("zoomend", function(e){ ... });
});
I think the PrintStart event might be the route I am looking for. Thank you for the follow-up.
Is your feature request related to a problem? Please describe. I have some HTML text labels that resize/re-center themselves on
zoomend
in normal mode. I am looking for a seam that I can enable this same functionality when in print mode.Or to say it another way, if a user zooms on the map in print mode, the labels become skewed and off-centered of their space b/c the handler is disabled.
Describe the solution you'd like ~If a flag passed to the plugin prevented disableClickPropagation, would this re-activate the
zoomend
handlers on the clone?~Update: enabling this does not pass along the click handlers from the clone, so I am still interested in having this functionality, just not sure what a viable solution is.
Describe alternatives you've considered I am looking at manually attaching the handlers or a deep-clone option, but those are outside of the context of this plugin and fraught with complexity. Any insight or suggestions would be appreciated. Thanks.