alyssaxuu / flowy

The minimal javascript library to create flowcharts ✨
MIT License
11.47k stars 998 forks source link

Question: Variable node height and arrows #92

Closed fcnyp closed 4 years ago

fcnyp commented 4 years ago

Have a situation where my nodes may have different heights. What I'm seeing is that when this occurs the arrow line starts at the original location, as if the node was the default height. Is there a method to adjust the arrows to the variable height of the node?

alyssaxuu commented 4 years ago

Hmm, I don't see any problems w/ arrows (although I just made a fix having to do with the blue pulse indicator being misplaced with dynamic blocks. Maybe you could check it out again?

Screen Shot 2020-07-29 at 7 28 42 PM
fcnyp commented 4 years ago

I can't merge that change in, my css differs so much now that change breaks the indicator all together =/

Where does the arrow start position get set? I'll have to start there.

alyssaxuu commented 4 years ago

I can't merge that change in, my css differs so much now that change breaks the indicator all together =/

Where does the arrow start position get set? I'll have to start there.

Agh I see. It gets set at the rearrangeMe function, the variable arrowy (which is then added as a SVG coordinate to draw the arrow). I'm not sure what version you have, you'd just have to make sure that the block height is taken into consideration + get rid of getComputedStyle(), I'm not sure why that was in there in the first place but it doesn't give accurate values.

I'll close this as it's not a library-specific issue, if you need more help though feel free to reach out :)