varkor / quiver

A modern commutative diagram editor for the web.
https://q.uiver.app
MIT License
2.37k stars 78 forks source link

Crossing over arrows #19

Open vikraman opened 4 years ago

vikraman commented 4 years ago

For 3d diagrams, could a button be added for using "crossing over" in tikzcd? This is something I often have to add manually after exporting.

varkor commented 4 years ago

This is definitely something I plan to add. However, it's more subtle than you might think. To make this work properly, the arrows need to be ordered (so that only arrows "below" the current one are cut out). Most likely, we'd actually want a layer system to make it intuitive and flexible. This adds quite a lot of complexity for a minor feature. It's definitely on the roadmap, but is probably blocked on https://github.com/varkor/quiver/issues/20.

AlexanderZeilmann commented 2 years ago

As far as I can tell, the arrows are always sorted in the order they were created, right? So in that sense, there is already a simple "layer system".

If users want to move arrows to the front, they can always delete the arrows and recreate them. There could be buttons to move arrows to the back or front, but they are not necessary for a first implementation, I think.

varkor commented 2 years ago

If users want to move arrows to the front, they can always delete the arrows and recreate them.

This would be quite an awkward way to manipulate layers. In any case, the complexity is really in the rendering and the exporting to tikz-cd (which has a rather ad hoc method of rendering crossing over arrows). I do plan to get to this when I have some more time (hopefully in the new year), but it's going to require some thought.

AlexanderZeilmann commented 2 years ago

You are absolutely right that this is a little awkward. I was just thinking about an implementation that does not require a complete rewrite of quiver.