branca icon indicating copy to clipboard operation
branca copied to clipboard

provide tools and prompts to clone child element if the child already has a parent

Open rl-utility-man opened this issue 11 months ago • 0 comments

I reported Folium issue 1885, which occurs because passing a single element to the add_child routine twice overwrites the first value of the parent variable inside the element object. @Conengmo suggested adding a clone routine to address this problem, which I have done. Applying add_child(exampleChild) always overwrites the value of the exampleChild.parent variable, which will lead to undesirable behavior, so I changed add_child to emit a warning that recommends submitting a clone instead when users try to do that.

Thanks for your help. Looking forward to discussing the best way forward.

rl-utility-man avatar Jan 21 '25 05:01 rl-utility-man