Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS error when manualMode is true #119

Open
techdaddies-kevin opened this issue Sep 13, 2022 · 1 comment · May be fixed by #140
Open

JS error when manualMode is true #119

techdaddies-kevin opened this issue Sep 13, 2022 · 1 comment · May be fixed by #140

Comments

@techdaddies-kevin
Copy link

techdaddies-kevin commented Sep 13, 2022

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
image
image

@techdaddies-kevin
Copy link
Author

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

@Falke-Design Falke-Design linked a pull request May 1, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant