Closed Ullas-A-2000 closed 1 month ago
This demo highlight the nodes to the root: https://code.balkan.app/family-tree-js/highlight-selected-node#JS
suppose yermolai kozolv is root user
his parents should be identified as ancestors and his children shold be identified as descendants
how?
Please explain in steps the behavior that you need? Click on which node? Then highlight or what and which nodes exactly?
lets say , my name is jhon and im the root user of tree
jhon has two children ema and may jhon has parents dexter and juliet
when i click on ema i should get descendant when i click on dexter i should get ancestor
similarly dexters parents are also jhons ancestors so when i click on them i should get ancestors and ema's childrens are also jhons descendants so when i click on the i should get descendants
I have created a code demo for you: https://code.balkan.app/family-tree-js/ancestor-or-descendant#JS
thanks
suppose on node click or a html class code how do we determine that a card is a ancestor of root user or descendant of root user