Added relative positioning#2
Conversation
|
@luisllamasbinaburo Yes this are two big issues that I haven't put in the time to figure out yet, so I appreciate your contributions here! The current assumptions (that I haven’t documented anywhere) is that the arrows are absolutely positioned in the body and the body has no margin. Im going to be away the next couple days but I’ll try think more about this problem and respond when I’m back! If we want this logic to be picked up by every arrow, then we can put it in the |
|
Also I’d love to learn more about what you’re planning to use quiver for and what sparked the need to have relatively position arrows? |
|
Hello. I think I haven't explained well about the arrows positioning relative to the containers. The arrows still get positioned absolutely. What happens is that to solve both issues, instead of creating a large SVG with 100% height and 100% width, at 0,0, in the proposal, I create an SVG adjusted to the size of the target and source boxes. This way, now the SVG has a size that is given by the target and source, and also has an offset from top left. Since the SVG now have an offset, to place the arrows correctly, the arrow coordinates need to be corrected, relative to the SVG's position. On the other hand, my purpose in using the library is to create the relationships in roadmap https://www.luisllamas.es/en/development-roadmap/ The equations I include in the PR are the ones I've made for the Astro component, and I include as a proposal to the library in order to contribute to its development, because I think it has great potential |
Yup I’m think I’m following you! |
With the current implementation, I face two problems:
I fixed this by introducing the concepts of
BoundingBoxandRelativeBox:And probably the concept needs to be ported to other arrow types or even to the Abstract.
But I don't want to change more things before having your opinion