What is Nostr?
David /
npub130m…4xtx
2024-12-26 16:47:19
in reply to nevent1q…ngfm

David on Nostr: nprofile1q…sk0gr You could probably emulate that stash feature on a Global: var ...

nprofile1qy2hwumn8ghj7un9d3shjtnddaehgu3wwp6kyqpqaw2gcqz09z6lq5w5thzcadjsy8n7srs8mczkgs4c5rvjyyfh96ns5sk0gr (nprofile…k0gr) You could probably emulate that stash feature on a Global:

var stashed := {}

func stash(child):
var p = child.get_parent()
stashed[child] = p
p.remove_child(child)

func unstash(child):
var p = stashed[child]
p.add_child(child)
return child

func unstash_by_name(child_name):
for child in stashed.keys():
if child.name == child_name:
return unstash(child)

Stashed nodes won't destroy when removing their parent. Also changes sibling index of nodes (render order).
Author Public Key
npub130mf08gj28t2dfmg54na26rf56qv9f5mrm977t6d2nta3kj8sa9q644xtx