sozi-projects / Sozi

A "zooming" presentation editor
http://sozi.baierouge.fr
Mozilla Public License 2.0
1.59k stars 165 forks source link

Arbitrary transformations when saving the source svg #647

Closed mlhoutel closed 2 years ago

mlhoutel commented 2 years ago

Summary of your problem or feature request

In some cases, saving the source svg while editing sozi will arbitrarily move and resize some layers.

Version of Sozi and other relevant software

Steps to reproduce the problem

  1. Create a svg with an image in a layer with a redefined position:
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 100 100">
   <g>
      <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100" height="100" viewBox="0 0 210 297">
         <g>
            <image width="206" height="80" id="image" x="2" y="2"
               href="https://pixnio.com/free-images/2018/08/21/2018-08-21-20-52-01-460x264.jpg">
            </image>
         </g>
      </svg>
   </g>
</svg>
  1. Open it in sozi, add 2 slides
  2. Add an animation with a translation and zoom on the second slide
  3. Save the sozi document
  4. Open the generated html => the animation works correctly
  5. Save the source svg document
  6. Save the sozi document
  7. Open the generated html => the image has been translated and scaled down

Expected behavior

Editing and saving the source svg should only take into account the updates of the document and apply them as such in the sozi project.

Observed behaviour

Editing and saving the source svg apply arbitrary translations and resize of layers in the sozi project.

mlhoutel commented 2 years ago

Thanks