jerosoler / Drawflow

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

Possible to add rerouteMoved event? #204

Closed shidcordero closed 3 years ago

shidcordero commented 3 years ago

I'm saving all user changes inside drawflow like the list below:

 this.editor.on('nodeCreated', this.save)
this.editor.on('nodeRemoved', this.save)
this.editor.on('nodeMoved', this.save)
this.editor.on('connectionCreated', this.save)
this.editor.on('connectionRemoved', this.save)
this.editor.on('addReroute', this.save)
this.editor.on('removeReroute', this.save)

and I've notice that there's no rerouteMoved event. Is it possible to add rerouteMoved event?

shidcordero commented 3 years ago

I actually need it now so I'm planning to create a patch for it but I don't know how to start with, can you guide me how I can do it?

jerosoler commented 3 years ago

She thought the event existed. 👀

I'll add it today.

View guite to PR: https://www.freecodecamp.org/news/how-to-make-your-first-pull-request-on-github-3/

jerosoler commented 3 years ago

Added event in 0.0.45

  editor.on("rerouteMoved", function(id) {
      console.log("Moved reroute " + id);
    })
shidcordero commented 3 years ago

works great. thanks