Interface Event
Interface event emitted by Blackprint
iface.on('port.menu', function(data){
data.menu.push({
title:"With callback",
callback:function(){...}
});
data.menu.push({
title:"Callback with arguments",
args:[1, 2],
callback:function(one, two){...}
});
data.menu.push({
title:"Callback with context",
context:data.port,
callback:function(one, two){
// this === data.port
}
});
data.menu.push({
title:"When mouse over the dropdown item",
hover:function(){...},
unhover:function(){...},
});
data.menu.push({
title:"Deep level menu",
deep:[{
title:"Level 1",
deep:[{
title:"Level 2",
deep:[{...}]
}]
}]
});
})Last updated