jerosoler / Drawflow

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

Animation line connection #748

Open adrielov opened 11 months ago

adrielov commented 11 months ago

I would like to know how to add a directional movement animation to the connecting lines... something like the example below.

https://codesandbox.io/s/4qrdpd?file=/DownloadButton.js&utm_medium=sandpack https://reactflow.dev/docs/examples/misc/download-image/

jerosoler commented 11 months ago

Simple add in css:

    .drawflow .connection .main-path {
      stroke-dasharray: 5;
      animation: dashdraw .5s linear infinite;
    }
    @keyframes dashdraw {
    0% {
        stroke-dashoffset: 10
      }
    }