-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Describe the bug
I reported the issue in #1002 and #1003 seemed to have resolved it. However a new "git clone" does not work to allow this code to work:
svgEditor.svgCanvas.rasterExport("PNG", 100)
It will create the export of just the SVG tags.
However an svg tag will not be included
To Reproduce
Steps to reproduce the behavior:
- Menu > Open
- Open this SVG file as an example:
<svg width="840" height="1269" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
<g class="layer">
<title>Layer 1</title>
<image height="1269" href="https://apod.nasa.gov/apod/image/2411/earthset-snap00.png" id="svg_1" width="840"/>
</g>
</svg>
- This should show the image, if it does not then you need to add "href" tags to the svgedit/packages/svgcanvas/core/santize.js (line 51)
- Rebuild
- reload from step 2 above.
- Add a couple of SVG objects (lines or whatever)
Then test the export: - Menu > Export
- This should show the background image and the tags all composited onto a single PNG image. However this does not work, it only shows the SVG elements that are NOT the image. This is the broken part.
Expected behavior
Menu > Export should generate a PNG image with all the SVG tag content (images and other tags).
*SVG-Edit environment (IMPORTANT)
- Version: current version from "git clone"
Desktop (please complete the following information):
- OS: Linux (same on any OS)
- Browser firefox (same on any browser)
Log
Here is the output in the Firefox javascript "Console" that shows the error:
Additional context
Weird thing is that this worked when #1003 was fixed. But not it stopped working on a new git clone.
Please let me know if I can help with any other details.
Thanks!
Alex.