sozi-projects / Sozi

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

Problem when fitting to an Outline Element in Sozi 17.02 #392

Closed clement-moulin-frier closed 7 years ago

clement-moulin-frier commented 7 years ago

Hello @senshu ,

Summary of your problem or feature request

When trying to position an element of the SVG w.r.t. another Outline Element, the element remains at the same place instead of being positioned correctly. It is the case both in the Sozi editor and in the browser. Last time I used Sozi with version 16.02, it was working well (from what I remember), but now the behavior is not what I would expect (see detail below). Note that I'm working on a brand new SVG (not the one I was using with 16.02).

Version of Sozi and other relevant software

Steps to reproduce the problem

Expected behavior

I expected Layer2 to be positioned w.r.t to Ref2

Observed behavior

Layer2 keeps being positioned w.r.t Ref1

Hints and solutions (optional)

Maybe it related to the change of concept between what was called before Reference Element and what is now called Outline Element, as mentioned in the 17.02 release. However I don't know what has changed exactly. (more explanation could help me.)

Thanks a lot! Clément

aumouvantsillage commented 7 years ago

I could not reproduce the problem with the given instructions. When creating my SVG, I made the assumption that Ref1 is in Layer1 and Ref2 is in Layer2. Is it true?

It would help if you could provide an example document that illustrates the problem.

clement-moulin-frier commented 7 years ago

Hi,

Ref1 and Ref2 are both in Layer1 in my case. Here are the files: the SVG and the JSON. You will see that in Frame2, the Outline Element of the blue rectangle (equivalent to Elem2 in my previous description) is ref2, but it keeps being positioned w.r.t ref1, even when pressing the Fit to element button. If you could provide the sequence of operations allowing to position that blue rectangle in the reference frame of ref2, it would be fantastic.

Thank you, Clément

clement-moulin-frier commented 7 years ago

Following my last message: it actually works when Ref1 is in Layer1 and Ref2 in Layer 2, but not when both are in Layer1. Does it mean that an Outline Element should necessarily be in the same layer as the element refering to it? If so, is it still possible to use the same outline element for positioning elements that resides in different layers? (e.g. in the above example: using Ref1 as the outline element of both Elem1 and Elem2)

Thanks

aumouvantsillage commented 7 years ago

2017-05-25 23:01 GMT+02:00 Clément Moulin-Frier notifications@github.com:

Does it mean that an Outline Element should necessarily be in the same layer as the element refering to it? If so, is it still possible to use the same outline element for positioning elements that resides in different layers? (e.g. in the above example: using Ref1 as the outline element of both Elem1 and Elem2)

"Fit to element" will zoom, move and rotate all selected layers so that the outline element fills the current frame. The outline element must be in at least one of the selected layers.

clement-moulin-frier commented 7 years ago

Sorry buy I think I still don't completely get it. Can you please try with those files: SVG and JSON. Here ref1 is in Layer 1 and ref2 is in Layer 2. In Frame 1, both layers use ref1 as the outline element. Works as expected. In Frame 2, both layers use ref2 as the outline element. Works as expected as well. However in Frame 3, I'd like both layers to use ref1 again, but only Layer 1 is positioned correctly. Layer 2 keeps being outlined by ref2, even when selecting both layers and pressing Fit to element as you say. For selecting both layers, I first click on the timeline cell at "coordinates" (Layer1, Frame 3), then press and hold Ctrl, then click on the timeline cell at "coordinates" (Layer2, Frame 3).

Could you please tell me how I could outline both layers with ref1 in Frame 3?

Thanks for the help.

aumouvantsillage commented 7 years ago

I see that frame 3 does not correspond to what you want, but I'm still confused about the procedure that you followed to get this result. I opened your presentation in Sozi and did this:

  1. Delete frame 3
  2. Select frame 2
  3. Create new frame 3
  4. Select both layers in frame 3
  5. Set the outline element Id to ref1
  6. Press "Fit to element"

Both layers are correctly aligned like in frame 1.

clement-moulin-frier commented 7 years ago

Thanks for the hint, it works indeed in this case. The problem is that this appears frequently when working on more complex presentations and I don't know any procedure that would solve the problem in a general way. For example, I just tried the procedure you provide above on the presentation I'm currently working on and it doesn't work (I attach files and description at the end of this message if you want to give it a try). Last time I was using Sozi (around november-december 2016), I didn't have that kind of problem at all, so I'm wondering whether how reference elements are managed has changed since that time? If so, I don't mind using an older version and it would be nice if you could point to the most recent version where reference elements were implemented as before. Thank you. Regarding the presentation I'm currently working on, here are the files: SVG and JSON. In the last frame (motor_babbling), I'd like to outline the layers motor_vs_goal and motor_babbling with the rectangle ref_explauto_mb_gb (which belong to the layer motor_vs_goal). (By writing this I just notice that a layer as the same name as a frame, but I don't think the problem comes from this, I did it many times in the past). I tried to do as you said: removing the last frame, creating again and then fitting, but doesn't work here.

Best, Clément

aumouvantsillage commented 7 years ago

The "reference element" serves as an "anchor" that helps Sozi recover the correct location of a layer even if you move things in the SVG document. For this reason, a reference element must be located inside the layer that it controls. In Sozi 16.x, the reference element was also used for the "Fit to element" function. Users could fit several layers to the same element. It was convenient but risky, because some layers were left without an "anchor".

In Sozi 17, the reference element is hidden and I have added an "outline element". Let me repeat what I wrote in a previous comment above:

"Fit to element" will zoom, move and rotate all selected layers so that the outline element fills the current frame.

The same transformation is applied to all selected layers starting from their current position. Before pressing the "Fit to element" button, all layers must already be positioned correctly with respect to each other and to the outline element. Sozi assumes that the desired frame content is what you can see inside the rectangle before pressing the button.

In your example, you don't get the expected result because the content of the layer motor_babbling is not inside the rectangle ref_explauto_mb_gb when we reach frame 5.

From your previous explanations, I understand that you would prefer an "absolute" version of the "Fit to element" function where the desired frame content is what you can see inside the rectangle in the original SVG.

aumouvantsillage commented 7 years ago

I have made several changes to address this issue. Sozi 17.05.271506 contains two new features:

These features also address your comment to issue #295 where you observed problems keeping layers in sync when new layers are added to a presentation.

You can download Sozi 17.05.271506 from: https://drive.google.com/drive/folders/0ByRUreHgekjMWG9teGM2dE8wck0?usp=sharing

clement-moulin-frier commented 7 years ago

Thanks a lot for the detailed information and the new feature. It does work when I select motor_babbling in the timeline and select motor_vs_goal in the new Copy layer drop-down list. However, I'm now experiencing other problems, still related to outline elements, that I describe below. Before going into this, and because I'm on a short deadline for finishing this presentation, I would really appreciate if you could point to the last previous version of Sozi where reference elements were managed as before, so that I can continue advancing my work. Of course in the meanwhile I will also continue the tests on the new version with you in order to help debugging the new feature.

Here is the current version of the presentation where I have restarted the Sozi animations from scratch with version 17.05.271506 (please re-download both files because the SVG is now the full one I'm working on): SVG and JSON. I've used the new drop-down list to align the motor_babbling layer and it worked. Then I continued by adding and aligning new layers in new frames, i.e. frames 6, 7 and 8 in Sozi. At one point, the title at the top of the slides disappeared (blue text "Autonomous exploration in developmental robotics" in the SVG, residing in the layer explauto_title together with its reference element ref_explauto_title). Note that this text has been converted to a path for being displayed correctly in the browser. I think the reason why it disappeared is because at one point I selected an entire frame by clicking on its title in the timeline, then selected the motor_vs_goal layer in the Copy layer drop-down list, so that all layers are aligned to the same element. I thought that I will then be able to re-align the explauto_title layer with the outline element ref_expauto_title, but this doesn't work: if I select the explauto_title layer in the timeline, then indicate ref_explauto_title as the outline element and press Fit to element, nothing happens. What I want is to have this text aligned with ref_explauto_title from frames 2 to 8. I've tried by selecting individual cells in the timeline as well as by selecting the entire layer row, without success. Do you have any hint of how I could re-align this layer correctly? (i.e. having explauto_title aligned with ref_explauto_title from frames 2 to 8.) For information, I've tried to remove this layer from the timeline and adding it again, as well as to remove the last frame and adding it again, without success. Thank you, Clément

aumouvantsillage commented 7 years ago

I would really appreciate if you could point to the last previous version of Sozi where reference elements were managed as before, so that I can continue advancing my work.

Any version before Sozi 17.02.

At one point, the title at the top of the slides disappeared

From my point of view, it is a different problem. Possibly related to issue #374 that was reported for Sozi 16.02. I need more information on how to reproduce this issue: I can see the problem in your document but I don't know what steps you followed to get this result.

I'm sorry for this situation. It must be frustrating if you are in a hurry. If you agree, please continue this conversation in the thread for issue #374

aumouvantsillage commented 7 years ago

Please see my comment in issue #374. You can download the latest development version and do "Fit to element" on the layer explauto_title.

clement-moulin-frier commented 7 years ago

You can download the latest development version and do "Fit to element" on the layer explauto_title

Thanks, I am going to try with the new version but it is not in the google drive, see my comment in #374 .

Any version before Sozi 17.02.

OK, I'll first check with the last dev version. If not working I'll temporarily switch to 16.02 from the release page. Please let me know if there is a more recent one between the release of 16.02 and the release of 17.02. (16.xx versions are not in the nightly build google drive.)

I need more information on how to reproduce this issue: I can see the problem in your document but I don't know what steps you followed to get this result.

I'm now trying to reproduce the bug in a minimal presentation, I keep you updated.

Best,

clement-moulin-frier commented 7 years ago

Regarding using temporarily v16 so that I can finish my ongoing presentation, I can only find 16.02 in the releases. Is there a way to download 16.11 instead, so that I can have a version addressing #300 ? Thanks

clement-moulin-frier commented 7 years ago

I've been working with the new version during the last hours without any major problem, it now works very well. This software is fantastic, really :)

Just a few comments/propositions/questions:

Thanks a lot for the nice support, very appreciated! Clément

clement-moulin-frier commented 7 years ago

Hi @senshu ,

There is a reminding bug which is problematic. Here is a minimal example:

Thanks

aumouvantsillage commented 7 years ago

I'm wondering if the Copy layer function shouldn't be abstracted to the user to make the interface simpler.

I have implemented "Copy layer" because it also solves issue #295 There are valid cases when a user wants to realign layers even if he does not use an outline element.

Moreover, it is not obvious that all users will want to realign layers before pressing "Fit to element".

I still don't understand the Autoselect element function of the outline element, is it explained somewhere?

When "Autoselect element" is enabled, Sozi proposes the biggest visible element as a candidate outline element. The tutorial Using layers uses this feature.

I would be happy to discuss them with you. If you are interested, what is the best channel to do it, by opening a github issue on this topic?

Feature requests or usability issues can be reported as GitHub issues. Other topics can be discussed in the sozi-users discussion group.

clement-moulin-frier commented 7 years ago

OK, thanks for the info. Any idea on how to solve the problem described in my last message above?

aumouvantsillage commented 7 years ago

OK, thanks for the info. Any idea on how to solve the problem described in my last message above?

Yes.

When you create frame 2, it is "linked" to frame 1 by default. "Copy layer" should unlink it, but it does not.

This is fixed in the source repository. A new version will be available soon (upload is in progress).