Skip to content

Node manipulation by level #32

@stengel

Description

@stengel

Rather than clicking on single nodes for adding nodes, setting players, merging / dissolving info sets (?), allow this operation for the whole level by having a dashed line appear when the mouse hovers over that level, and clicking on that line applies the operation to all nodes indicated by that line.

tree-level50

Specific behavior when adding nodes:
In principle, clicking on that line for "apply to all nodes on that level" just means performing the "add" operation to each single node. However, I think this would be confusing in the following scenario: Suppose the user has first generated children by clicking on individual nodes, and is now on the fourth level with 8 nodes and is getting bored. After giving individual children to the first two of those 8 nodes, he discovers the "level" functionality and clicks on the line. Now, simply applying "add" to all children would result in the first two getting an extra child (now having 3 nodes), with the remaining 6 getting 2 children, which is most certainly not the intention. I think the effect (number of children) should be uniform for all nodes on that level. This would be implemented as follows:

  • find the node with the fewest number of children on that level
  • for all nodes that have that same (lowest) number of children, apply the "add" operation. In particular, nodes that have already several children (e.g., three children), are untouched.
  • the effect is that if all nodes have the same number of children, they are all treated the same way.
  • if the result is not as desired, the user can simply use the undo button.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions