Jump to content
Friksel

[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>

 


 

Share this post


Link to post
Share on other sites
On 5/4/2018 at 10:15 AM, Sean P said:

Hi Friksel,

Thanks for letting us know! I can reproduce this here and will get it passed on to development.

@Sean P Nice to see this is fixed in Affinity Designer Customer Beta - 1.6.5.112. Thanks a lot guys!


 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

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.