I am trying to add a capability that on hover I will show extra icons after the node label which can be clicked. E.g.
- Node 1 [E] [D] <-- hovering of the node should show extra icons
- Node 2
With the code:
var itemText = '';
tree.attachEvent('onMouseIn', function (id) {
itemText = Tree._tree.getItemText(id);
tree.setItemText(id, itemText + '<span class="edit"></span><span class="delete"></span>');
});
tree.attachEvent('onMouseOut', function (id) {
tree.setItemText(id, itemText);
});
Hovering anywhere on the row triggers a single onMouseIn event, BUT when I go across the span tags I get a mouse OUT followed by a mouse IN which causes flicker. Even if I make the underlying row size big enough to accommodate the added icons.
Is there a best practice to achieve this kind of effect? Essentially having context menu on the hover rather than right click.
Thank you in advance!