beforeUnSelect

fires on unselecting an item, but before the item is really unselected

void beforeUnSelect(string|number id){ ... };

Parameters

idstring|numberthe item id

Example

var diagram = new dhx.Diagram("diagram_container", { 
    type: "org", 
    select: true        
});
 
diagram.events.on("BeforeUnSelect", function(id) {
    console.log("Unselecting " + diagram.data.getItem(id).text);
    return true;
});

Related samples

Details

Returning false from the event handler will block unselection.

See also
Back to top