leaflet.browser.print
leaflet.browser.print copied to clipboard
JS error when manualMode is true
Describe the bug When the print control is instantiated with manualMode: true, when clicking the "Print" button that shows up after hitting the print control, a JS error is produced and the document does not print. This is using 2.0.2 Dist version.
To Reproduce Steps to reproduce the behavior:
L.control.browserPrint({
printModes: ['Landscape'],
closePopupsOnPrint: false,
position: 'topright',
manualMode: true
}).addTo(this.map.canvas);
Expected behavior Printing should work when clicking the print button
Screenshots
Looking at this with fresh eyes, the bug is obvious.
self.browserPrint._completePrinting(map, origins, objects);
should be
self._completePrinting(map, origins, objects);
in src/leaflet.browser.print.js