tableaunoir / tableaunoir

An online blackboard 🖉 with fridge magnets 🌈🧲 for teaching, and making animations 🏃 and presentations ⎚. All of that in a lightweight user interface.

Home Page:https://tableaunoir.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some magnets do not print when Ctrl+V

francoisschwarzentruber opened this issue · comments

  • Magnets from openmoji cannot be printed.
  • Cars are printed but not with the correct color, or with the correct angle.

Cars were not rotated in Chrome because the CSS rule "rotate: 2.5rad" is invalid in Chrome, but valid in Firefox. This problem was solved by using "transform: rotate(2.5rad)" instead, that is valid both in Firefox and Chrome.

Magnets from openmoji are printable like a charm on Chrome. However, on Firefox, they are not printable. I think the reason is because width and height of SVGs should be specified very carefully in the DOM of the SVG files, whereas Chrome does not care.
See https://stackoverflow.com/questions/38106906/canvas-drawimage-inline-svg-doesnt-work-on-firefox/38107431#38107431

When creating a magnet, the solution would be to:

  1. load the svg code
  2. patch with width and height
  3. get the image from it