jerosoler / Drawflow

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

I want to have a confirmtaion before deleting a connection. i have used editor.removeConnection = function() {} method, and whenever i click on delete, this gets triggered. What should i write in my confirm message inorder to delete the connection #298

Closed MaleehaYasvi closed 2 years ago

MaleehaYasvi commented 2 years ago
    _this.editor.removeConnection = function(id) {
    const res = confirm('are u sure u want to delete');
        if(res == true){

//which method should i use } }

MaleehaYasvi commented 2 years ago

using _this.editor.dispatch('connectionRemoved'); it goes into this event, but connection is still visible in the UI

jerosoler commented 2 years ago

View: https://github.com/jerosoler/Drawflow/issues/240

Closed for duplicate.