Closed PabloPerezAguilo closed 3 years ago
There allready is an example for a node with a dblclick event here.
Other option for dblclick event:
var id = document.getElementById("drawflow");
const editor = new Drawflow(id);
id.addEventListener('dblclick', (e) => {
if(e.target.closest(".drawflow_content_node") != null || e.target.classList[0] === 'drawflow-node') {
if(e.target.closest(".drawflow_content_node") != null) {
var input_id = e.target.closest(".drawflow_content_node").parentElement.id;
} else {
var input_id = e.target.id;
}
alert(input_id.slice(5));
}
});
For contextmenu view: https://github.com/jerosoler/Drawflow/issues/187
Great! Thx!
May it be interesting to fire the dblclick event on a node? In this way we can add listeners on nodes to show contextual menu or whatever