Jump to content

[AD] Changing Opacity of group or layer disturbes hierarchy and structure in SVG export


Recommended Posts

When exporting a file to SVG from within Designer, for each layer or group having an opacity set below 100%, Designer automatically adds an extra, redundant, group just to apply opacity to:

 

* Adding a group without opacity set less then 100%:

<g id="myID">
  <rect x="152.01" y="85.967" width="142.705" height="84.033"/>
</g>

* But when opacity of the group is set below 100%:

<g id="myID">
  <g opacity="0.5">
     <rect x="152.01" y="85.967" width="142.705" height="84.033"/>
  </g>
</g>

 

This results in larger and more complicated SVG-outputs then necesary, but most importantly: it breaks the structure and hierarcy as meant by the designer causing all kind of problems when using the SVG for styling and javascript usages: interactivity and animations. Because suddenly there is an extra, unexpected level in hierarcy and the ID is on a different level then the opacity. That way webdevelopers can't trust the ID anymore.

 

Instead the opacity should be applied directly to the group like visually done in Designer, keeping the structure the same as in the GUI and so meant by the designer:

<g id="myID" opacity="0.5">
  <rect x="152.01" y="85.967" width="142.705" height="84.033"/>
</g>

 

 

Link to post
Share on other sites
  • 2 weeks later...
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Please note there is currently a delay in replying to some post. See pinned thread in the Questions forum. These are the Terms of Use you will be asked to agree to if you join the forum. | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.