SVG update transform matrix not saved

52 Views Asked by At

Recently I have been working with svg and images on a website. My task is to re-calculate the transformation matrix then apply it on the image.

The HTML structure is as below

    <svg>
      <g>
        <image>

I have found a way to update the transformation matrix which is

    $(groupElement).attr(“transform”, “matrix=(a,b,c,d,e,f)”)

where a,b,c,d,e,f are numeric values based on my computation.

This has applied the desire transformation on the image itself. However, the change is not kept on submission by clicking on the form submit button nor by refreshing the page.

I am aware that there might be some events need to be fired in order to persist the update but have no idea about which is/are needed by the SVG.

I have spent days on this issue without going anywhere thus any help would trully be appreciated. Thanks alot for your time.

Alex

0

There are 0 best solutions below