Closed sachintha180 closed 3 months ago
So I managed to resolve the issue by getting rid of the margins entirely. and using relative positioning for my div.column
(s). I then added left
and top
properties to the columns' CSS to position them in cascading fashion:
I also made sure to align-items: flex-start
to the #input-layer
container (which holds all the columns) - which together with the above alterations fixed the issue.
Hey! Thank you for the very detailed issue and solving it yourself ❤️ Do you think there needs to be job done on the lib's side to improve this?
Hi, thanks for taking your time to go through the issue :love_you_gesture:.
And no, I don't think there's any changes required from the library to improve this behaviour.
Using relative
positioning + left
+ top
properties for the children and flex
for the parent (which I believe is a much better approach to positioning the columns compared to the margins method I used earlier) when you have multiple cascading children works perfectly with react-arrows
.
I do have one question though - I've added labels to my arrows via the relations.label
property you've provided for all <ArcherElement>
components; as follows:
Is there any way these labels could be moved along the arrows? i.e. not always be positioned in the center.
Otherwise, is there any way we could grab the arrow's svg
coordinates and position the labels ourselves?
Hi, I'm creating a simple neural network visualization using react-archer. My experience with
react-archer
for this project has been amazing, but I've a bit stumped with the following:I've created a component called
Model.tsx
:The associated
FeatureVector.tsx
component is as follows:The render looks like this:
The issue is that the arrows have all positioned themselves to the middle of the entire flex column, and not just the div with class
column
.My expectation is that the arrow starts at the middle of the
div
, as shown on the diagram below:Maybe the solution has nothing to do with
react-archer
itself, but I couldn't really seem to figure it out hence this post.I have also added an explicit
marginLeft
andmarginTop
property to thediv.column
elements to position them in the cascading fashion seen above - maybe this has something to do with this issue.Thanks for looking into this!