jerosoler / Drawflow

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

Text node #393

Closed pkasson closed 2 years ago

pkasson commented 2 years ago

How hard would it be to do a text node only text shows like an annotation in Vizio or just putting clear text next to notes for descriptions.

jerosoler commented 2 years ago

I could make a node with a textarea. And class transparent or color of note.

You might have a problem with the height of the node. You can see a solution here:

pkasson commented 2 years ago

Is it possible to have a different type of object for text and not a node ? There is a line object - is that not different ?

It could be a small div with a transparent BG ... does that fit into this architecture ?

jerosoler commented 2 years ago

They are different yes, but they are in the core of the library.

There is no easy way to add a new element.

But a node is still a div. It can be made transparent with classes and without inputs and outputs.

You can see in the demo how there is a node without inputs and outputs. And another node with another type of color. image

pkasson commented 2 years ago

Yep - I created a simple node that has a transparent BG with no connectors ... just need to eliminate the border and it will do the job.

Thanks !