You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:
Current behavior
There is no function that supports dragging a node to a new position in the model, or moving an existing node from one location to another in the model
Expected behavior
There should be a function that allows you to pass in a step ID for an existing step and its new location. The function would then rearrange the model with the node in the updated location. There could be an option to include its children when moving, or to only move the one node.
If the children are included, then every node that comes after the location that the node is moved to will have to be potentially updated as well. If it's just the one node, and its previous children stay, then the moving node and its previous children will have to be updated.
For example, let's say we want to move node 3:
1 → 2 → 3 would change to 1 → 3 → 2
Or
1 → 2 → 3 → 4 would change to 1 → 3 → 2 → 4 OR 1 → 3 → 4 → 2
In the second example there, with the four nodes, the desired result depends on if the node's children should be moved or not as well.
This gets more complicated as branches are introduced. If a node is being moved:
and it has branch siblings, then the branch siblings would likely stay, but be updated (since their sibling has left).
and it is moved to be a child of another parent that already has at least one child (creating multiple branches from one parent) then the branch numbers should be updated properly for all siblings
and its children are coming along, and those children have a branch, then all nodes after the last child of the node being moved should be set as children of branchPath 1 (this one is definitely more complex)
Take this model:
1
2
3 4
If we are moving node 2 and its branched children up above 1, it should end like this:
2
3 4
1
In this case, node 1 is just updated to be a child of branchPath 1. If only node 2 is moved and not its children, then it would end up like this:
2
1
3 4
And nodes 3 and 4 should be updated to have node 1 be their parent Id, and not node 2.
What is the motivation / use case for changing the behavior?
Some UIs will want to implement drag and drop, and this will help enable it. The service itself won't implement the drag and drop necessarily, unless in the future a component that displays the model is provided and handles drag and drop and stuff like that.
The text was updated successfully, but these errors were encountered:
I'm submitting a...
Current behavior
There is no function that supports dragging a node to a new position in the model, or moving an existing node from one location to another in the model
Expected behavior
There should be a function that allows you to pass in a step ID for an existing step and its new location. The function would then rearrange the model with the node in the updated location. There could be an option to include its children when moving, or to only move the one node.
If the children are included, then every node that comes after the location that the node is moved to will have to be potentially updated as well. If it's just the one node, and its previous children stay, then the moving node and its previous children will have to be updated.
For example, let's say we want to move node 3:
1 → 2 → 3 would change to 1 → 3 → 2
Or
1 → 2 → 3 → 4 would change to 1 → 3 → 2 → 4 OR 1 → 3 → 4 → 2
In the second example there, with the four nodes, the desired result depends on if the node's children should be moved or not as well.
This gets more complicated as branches are introduced. If a node is being moved:
Take this model:
3 4
If we are moving node 2 and its branched children up above 1, it should end like this:
3 4
1
In this case, node 1 is just updated to be a child of branchPath 1. If only node 2 is moved and not its children, then it would end up like this:
3 4
And nodes 3 and 4 should be updated to have node 1 be their parent Id, and not node 2.
What is the motivation / use case for changing the behavior?
Some UIs will want to implement drag and drop, and this will help enable it. The service itself won't implement the drag and drop necessarily, unless in the future a component that displays the model is provided and handles drag and drop and stuff like that.
The text was updated successfully, but these errors were encountered: