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

Method insert

gui/tree.go:410–418  ·  view source on GitHub ↗

insert inserts this node and its expanded children in the tree list at the specified position

(pos int)

Source from the content-addressed store, hash-verified

408// insert inserts this node and its expanded children in the tree list
409// at the specified position
410func (n *TreeNode) insert(pos int) int {
411
412 n.update()
413 n.tree.List.InsertAt(pos, n)
414 var padLeft float32 = n.tree.styles.Padlevel * float32(n.level())
415 n.tree.List.SetItemPadLeftAt(pos, padLeft)
416 pos++
417 return n.insertItems(pos)
418}
419
420// insertItems inserts this node items in the tree list
421// at the specified position

Callers

nothing calls this directly

Calls 5

updateMethod · 0.95
levelMethod · 0.95
insertItemsMethod · 0.95
SetItemPadLeftAtMethod · 0.80
InsertAtMethod · 0.45

Tested by

no test coverage detected