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

Allow the user to print the current viewed map #1075

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

davidbgk
Copy link
Contributor

@davidbgk davidbgk commented May 3, 2023

Refs #88

@davidbgk
Copy link
Contributor Author

davidbgk commented May 3, 2023

Refs 1904labs/dom-to-image-more#50 too.

@yohanboniface
Copy link
Member

Exciting!

Two first comments:

  • I'd put the print button on the left/white bar, which the one for reading the map, while the right/black one is dedicated to editing it
  • I'd hide all the map controls

@yohanboniface
Copy link
Member

Ah, bug, while using a map with a lot of objects, not sure if it's related:

image

@yohanboniface
Copy link
Member

Same with "a lot" of points:

image

@davidbgk
Copy link
Contributor Author

davidbgk commented May 3, 2023

I'd put the print button on the left/white bar, which the one for reading the map, while the right/black one is dedicated to editing it

I tried at first but it was a bit too complicated for a first time, let's adapt that together.

I'd hide all the map controls

There is a mechanism to filter out elements but I didn't try it yet!

Ah, bug, while using a map with a lot of objects, not sure if it's related:

The two errors are different, we might hit some limitations at some point, the dom-to-image tool is actually re-rendering the whole page to be able to convert it.

Also https://github.com/1904labs/dom-to-image-more has probably more bugs fixed but we have to retrieve the fix for iframes (see comments at the top of the copied file).

@yohanboniface
Copy link
Member

There is a mechanism to filter out elements but I didn't try it yet!

Can't we use a print css ?

@davidbgk
Copy link
Contributor Author

@davidbgk
Copy link
Contributor Author

We tried https://html2canvas.hertzen.com/ but:

If you wish to load images that reside outside of your pages origin, you can use a proxy to load the images. — https://html2canvas.hertzen.com/faq

So we do not have background tiles in the preview of the map.

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 this pull request may close these issues.

2 participants