Problem reopen sozi file in 17.06
Hi,
I have a problem with Sozi 17.06.
When I save a sozi presentation and reopen it .
all frames are saved but Frames Zoom and position are lost.
Steps to reproduce :
- create a Svg with many layers
- open Sozi 17.06 with this Svg
- add all layers in Sozi
- create new Frame
- zoom in specific position
- create new frame
- move layer to another position.
save file close Sozi reopen sozi with same svg
==> 1rst frame is ok ==> 2nd is not good, position and zoom are KO.
I join 2 Sozi files prez.sozi-after-close Sozi.json : 1rst sozi file save after when i quit Sozi. prez.sozi-after-reopen Sozi.json : 2nd sozi file auto saved after i reload my project without modification.
there are many diffs between files . Many cx/cy ,height/width, widthFactor/HeightFactor and deltaX/deltaY attributes are wrong in the 2nd file ex: 1rst file :
"layer19": {
"cx": 105.26034710322676,
"cy": 148.29850828895417,
"width": 54.78229094312746,
"height": 41.116951259742464,
"opacity": 0,
"angle": 0,
"clipped": false,
"clipXOffset": 0,
"clipYOffset": 0,
"clipWidthFactor": 1,
"clipHeightFactor": 1
},
...
"layer19": {
"deltaX": 5.1353471032267635,
"deltaY": 1.9860082889541673,
"widthFactor": 15.24376791460938,
"heightFactor": 12.530880383921515,
"deltaAngle": 0
},
2nd file
"layer19": {
"cx": 5.1353471032267635,
"cy": 1.9860082889541673,
"width": 1,
"height": 1,
"opacity": 0,
"angle": 0,
"clipped": false,
"clipXOffset": 0,
"clipYOffset": 0,
"clipWidthFactor": 1,
"clipHeightFactor": 1
},
...
"layer19": {
"deltaX": -94.95840289677324,
"deltaY": -144.33430421104583,
"widthFactor": 0.2831858407079646,
"heightFactor": 0.3033175355450237,
"deltaAngle": 0
},
Can you send me the SVG file? I cannot reproduce the issue without it.
my zip with screenshots + SVG + sozi.json files Sozi.zip
This issue seems to be related to issue #398 and to this discussion In many places in your presentation, Sozi uses text elements as "anchors" for positioning the layers.
It seems that Chrome (which Sozi is based on) cannot reliably compute the geometry of text elements. I will try to confirm that. Until this is solved, I can suggest two possible workarounds:
- Use rectangles as "outline elements". See the tutorial Using Layers for an example.
- Convert all texts to paths.
I confirm that the bug happens only when a text element is used as a "reference element" by Sozi. The rendering engine returns different coordinates for the same text element:
- When clicking the button "set as outline element" with the Id of a text element.
- When saving the presentation
- When reopening the presentation.
I also confirm that Sozi behaves normally when texts are converted to paths.
I'm experiencing the same issue... I save my file and when I reopen it the layer positions is lost. I'm running version 19. Is there any fix for this? It's very annoying when making big presentations (I have to reorganize everything because of that).
I cannot really "fix" this issue since it is not in my own code. Currently, the only reliable workaround is to convert all texts to paths in your SVG.
In my workflow, I usually keep two versions of each original SVG:
some-presentation.src.svgis the original document where I can modify the textsome-presentation.svgis a copy of the original, where all texts have been converted to paths. This document is used for creating the Sozi presentation.
Thanks for this workaround idea senshu. I'll try to use this way.
When you change some text, you change some-presentation.src.svg, convert text to path and save as some-presentation.src.svg... and doing that way your text don't move after resaving and reopening it in Sozi?
One of the problem I had is that sozi autosaves as soon as I reopen the file. So if the text position changes, I lost the original file. Is it possible to disable this autosave?
When you change some text, you change some-presentation.src.svg, convert text to path and save as some-presentation.src.svg
The actual steps are:
- Create
some-presentation.src.svg - Convert all texts to paths and save to
some-presentation.svg - Open
some-presentation.svgin Sozi
To modify the document, the steps are:
- Modify
some-presentation.src.svg - Convert all texts to paths and save to
some-presentation.svg - Continue working on the presentation in Sozi based on
some-presentation.svg
Converting texts to paths every time you modify your source SVG can be tedious and there is a risk to overwrite your original document by mistake. For this reason, I run the "convert-and-save" action using Inkscape from the command line like this:
inkscape --export-plain-svg=some-presentation.svg --export-text-to-path some-presentation.src.svg
The only file that I actually open in the Inkscape GUI is some-presentation.src.svg.
Is it possible to disable this autosave?
There is a preference for that but it seems to be broken.
For this reason, I run the "convert-and-save" action using Inkscape from the command line like this:
inkscape --export-plain-svg=some-presentation.svg --export-text-to-path some-presentation.src.svg
Many thanks! I'll try this way.
There is a preference for that but it seems to be broken.
Should be good to have this option working properly, to avoid losing the original files (if not running with this "convert-and-save" action). But thanks for the workaround.
I'm closing this issue as a duplicate of #398