zTree provide these types of mouse event callbacks, in order to facilitate the user to extend the functionality. And doesn't affect zTree normal function, This simple demo shows how to monitor the mousedown/mouseup/rightClick event.
Try clicking with the mouse on the zTree (left or right), by the way to see log.
mousedown event log:
mouseup event log:
rightClick event log:
2, Explanation of setting
Set attributes about 'setting.callback.beforeMousedown / onMousedown / beforeMouseup / onMouseup / beforeRightClick / onRightClick', please see the API documentation for more related contents.
3, Explanation of treeNode
No special requirements on the node data, the user can add custom attributes.