jerosoler / Drawflow

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

current positions and final positions #181

Closed AliZaibazr closed 3 years ago

AliZaibazr commented 3 years ago

Can we get the current positions of nodes, and the final position when the move completed?

jerosoler commented 3 years ago

Hello @AliZaibazr

Use events nodeSelected and nodeMoved And Methods getNodeFromId

Jero

AliZaibazr commented 3 years ago

Is there any example to use these methods in vue.js I am using them in a way this.editor.on('nodeMoved', function(id){ this.getCoords(id) })

getCoords in an other method in which getNodeFromId is called, but unable to call this method from event.

jerosoler commented 3 years ago

Use arrow functions

View https://github.com/jerosoler/Drawflow/issues/65#issuecomment-726160493

Jero

AliZaibazr commented 3 years ago

Thank You @jerosoler