Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Special layer used to automatically create frames #600

Open
00sapo opened this issue Feb 6, 2022 · 2 comments
Open

Special layer used to automatically create frames #600

00sapo opened this issue Feb 6, 2022 · 2 comments

Comments

@00sapo
Copy link

00sapo commented Feb 6, 2022

Patch proposal

I think it would be helpful being able to set the frame position directly in inkscape. For this, one could create a special layer "SoziFrames" and put there objects (mainly rect) that are then used to generate frames on import.

Example:

  • create layer "SoziFrames"
  • put there rect to decide where your frames will be
  • load the SVG with Sozi
  • if and only if the "SoziFrames" is available:
    • add all layers
    • take all the objects in "SoziFrames"
    • sort them by id or another special attribute
    • for each object:
      • add a frame
      • select the new frame
      • set the outline element
      • rotate as much as the object's rotation

That's it. I can find time to produce a patch if you find this interesting. Also, if you have advice on the feature itself or on the implementation, I would be happy to know them!

Finally, as in issue #592, this feature can maybe overlap or merge with inkscape multipage feature.

@aumouvantsillage
Copy link
Collaborator

aumouvantsillage commented Feb 6, 2022

Yes. I think this feature could be useful.

My personal preference would be to support the following layout:

  • Global SoziFrames layer (controlling layers that don't have a SoziFrames sublayer).
  • Content layer 1
    • SoziFrames sublayer 1
  • Content layer 2
    • SoziFrames sublayer 2
  • etc.

For each rectangle, maybe we should use the "Label" field of the object properties (XML attribute inkscape:label) to infer the frame ordering instead of the ID.

@00sapo
Copy link
Author

00sapo commented Mar 26, 2022

Hello, I tried working on this but I'm not that strong with JavaScript and the codebase is pretty large. Do you have any advice on how we could implement it? Where should we insert edits and which function should we use? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants