Open Xantomen opened 8 years ago
Done, with possible improvements!
Using html2canvas library.
Lines dissapeared after rendering, so had to add code to the htmlcanvas event to remove and readd the pertinent class to the Lines. Also controlling in prepareContainerToPrint that things like sort-handles don't show in the print version.
In other cases, might need this fix: https://github.com/cloakedninjas/html2canvas/commit/0bfd4a4e1fc92f15ec96a77e38de28729d9548e9
I just checked, you can use ctx.drawImage(img, 0, 0); to draw an svg into a html5 canvas element - this oculd be useful if you want to create exportable png images (http://jsfiddle.net/Na6X5/ + http://stackoverflow.com/questions/11112321/how-to-save-canvas-as-png-image) -Stefan