jerosoler / Drawflow

Simple flow library 🖥️🖱️
https://jerosoler.github.io/Drawflow/
MIT License
4.42k stars 714 forks source link

How do I add other things besides nodes inside the drawflow? #739

Open matheusfnl opened 11 months ago

matheusfnl commented 11 months ago

I want to add a button to the drawflow, it needs to move if I drag or zoom in the drawflow, is there a way to do that? i wish it wasn't a node, i'm using vue 2 and this button is a component, it would be great if i can use it.

Im trying to make something like this:

example

thanks for the library!

jerosoler commented 11 months ago

Add node with style

position:absolute; top: 124px; left: 200px;

Top for y positon and left for x

matheusfnl commented 11 months ago

Thanks for the answer! i'm facing other problem, i have this two nodes, i want to make them attached, so when i drag the "father" node, i want the "child" to be dragged too, but the opposite cannot happen, the "child" cannot be dragged with mouse.

example

the child node have his father id on the data, and i have a function to get a children using father id, this is the only relation between them.

Theres a way to link them the way I need?

jerosoler commented 11 months ago

Drawflow by default not allowed mutiple movement.

View for move multiple:

matheusfnl commented 11 months ago

Thank you!