Open Co-Maheshh opened 1 year ago
View:
you can set a display: none;
in the drawflow-delete class.
in my case I used the nodeMoved
event to change the value of my css variable
JS
this.editor.on("nodeMoved", function() {
document.documentElement.style.setProperty('--dfDeleteDisplay', 'none');
});
CSS
:root {
--dfDeleteDisplay: 'block';
}
.drawflow-delete {
display: --dfDeleteDisplay;
}
Kindly help me to add restriction so that user cannot delete first dragged node. Have a look in the code tried this but its not working.
mythis.editor.on("nodeRemoved", (id) => { if(id == 0){ this.toast.error("Cannot remove") return false; }
})