Diagram - Onclick event

I would like to trigger an onclick event when a person clicks on a diagram box. I have added the following script but I am not getting it to trigger. Is there another (better) method?

webix.ui({
  view:"diagram",
  container: "webix_diagram",
  // define mode for all links
  linkItem: {
    mode: "direct"
  },
  // configure all blocks at once
  item: {
    width: 200,
    height: 60,
    margin: 40,
    marginY: -50,
  },
  height: 900,
  width: 1500,
  select:true, 
  data: complex_tree_data, 
  links: complex_tree_links,

  onItemClick:{
    "test":function(ev, id){
                  debugger;
        alert(id);
    }
}


});

Comments

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!