MCPcopy
hub / github.com/g3n/engine / onMouse

Method onMouse

gui/tree.go:330–341  ·  view source on GitHub ↗

onMouse receives mouse button events over the tree node panel

(evname string, ev interface{})

Source from the content-addressed store, hash-verified

328
329// onMouse receives mouse button events over the tree node panel
330func (n *TreeNode) onMouse(evname string, ev interface{}) {
331
332 switch evname {
333 case OnMouseDown:
334 n.expanded = !n.expanded
335 n.update()
336 n.recalc()
337 n.updateItems()
338 }
339
340 n.litem.onMouse(evname, ev)
341}
342
343// level returns the level of this node from the start of the tree
344func (n *TreeNode) level() int {

Callers

nothing calls this directly

Calls 3

updateMethod · 0.95
recalcMethod · 0.95
updateItemsMethod · 0.95

Tested by

no test coverage detected