Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## The problem
- Generating the XML to draw a family tree in flash using none linear relationships. Most family trees use Mother / Father... but what if the person has two mothers or two fathers... or one mother and two fathers. Thinking more emotional than genetic. Say we start from a single family member and draw out the relationships from there... or load all the users and draw relationships to each one one by one.
- So, how do we come up with a way to consistantly represent this in a diagram and in XML.
- What are some of the issues we're going to hit.
- How do you know where to place the nodes?
- ## The Relationship Table - Sample Data
- +----+---------+-------+--------------------+-----------------------+
- | id | from_id | to_id | blood_relationship | personal_relationship |
- +----+---------+-------+--------------------+-----------------------+
- | 1 | 32 | 3 | parent | parent |
- | 2 | 36 | 3 | sibling | sibling |
- | 3 | 32 | 36 | parent | parent |
- | 5 | 39 | 1 | parent | parent |
- | 6 | 3 | 1 | spouse | spouse |
- | 7 | 3 | 39 | sibling | sibling |
- | 12 | 46 | 39 | spouse | spouse |
- | 13 | 46 | 1 | spouse | spouse |
- | 14 | 1 | 43 | spouse | spouse |
- | 15 | 27 | 1 | parent | parent |
- | 16 | 50 | 46 | spouse | spouse |
- | 17 | 20 | 11 | parent | parent |
- | 18 | 54 | 20 | parent | parent |
- +----+---------+-------+--------------------+-----------------------+
Add Comment
Please, Sign In to add comment