Support » Plugin: DrawIt (draw.io) » ipad icon not saved in SVG

  • Resolved AdrianAppdate

    (@adrianappdate)


    Hi,

    I love your plugin man! I have a little issue with SVG save. I use SVG export and when I do so – “ipad” icon (black, rectangular “clipart”?) is not visible in the exported file. Is that a problem with plugin? When I do regular export from Draw.io it works fine

    Thanks,
    A.

    https://wordpress.org/plugins/drawit/

Viewing 5 replies - 16 through 20 (of 20 total)
  • Thread Starter AdrianAppdate

    (@adrianappdate)

    assortedchips, apparently it happens only when the picture is inside this Documentor plugin. When it’s displayed in the post it’s OK but inside the Documentor Doc icons are gone. Maybe you can see something in the file but if it’s the issue with Documentor itself – let’s just leave it and I will contact them.
    https://www.dropbox.com/s/reb07rl4jjv5c30/drawit-diagram2.svg?dl=0

    Plugin Author assortedchips

    (@assortedchips)

    It looks like the draw.io website also changed their SVG encoding format that gets returned to this plugin. I have updated this plugin. Please update to version 1.0.15 and try again. This works fine for me now, including when used within the Documentor plugin.

    Thread Starter AdrianAppdate

    (@adrianappdate)

    @assortedchips
    The issue is present in Safari only:) I guess it’s not evenr related to DrawIt. SVG files containing embeded ipad icons within Documentor are not rendered properly. Since I’m sick and tired of chasing this and it’s clearly not an issue with DrawIt I’ll just stick to chrome and it’s all good 🙂
    Thanks for your amazing support!

    Adrian

    Plugin Author assortedchips

    (@assortedchips)

    Yes, apparently this is a problem with Safari’s support of SVG images (learn something new every day!). It appears that this only occurs in Safari when the SVG image is referenced via an <img> tag, but everything gets displayed correctly if the <img> tag is replaced with an <object>. For example:

    broken image:
    <img src="pathtoimage.svg">

    changes to:
    <object data="pathtoimage.svg" type="image/svg+xml" width="100" height="80"></object>

    Note that “src” becomes “data”, you have to have a closing </object> tag, and the object needs to have width and height specified or else a scrollbar will show up.

    I will add an option in the DrawIt settings page to output SVG as object tags instead of img tags, but that won’t be for a while. For now you can manually specify the <object> way of doing this if you need SVG support in Safari. Note that if you choose to do <object> tags, then you won’t be able to use DrawIt to edit an <object> tag that you have selected (only supports editing <img> right now), so I will also have to implement <object> support with the future update as well when I get to it eventually.

    Thread Starter AdrianAppdate

    (@adrianappdate)

    Wow, you really dug into it, didn’t you:)
    That’s something very interesting, thanks so much for looking at it. I don’t need it that bad but as always Safari comes to be “the special” browser 😀

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘ipad icon not saved in SVG’ is closed to new replies.