Skip to content

Commit

Permalink
[2957] Fix custom node child previous position on layout
Browse files Browse the repository at this point in the history
Bug: #2957
Signed-off-by: Florian ROUËNÉ <florian.rouene@obeosoft.com>
  • Loading branch information
frouene authored and AxelRICHARD committed Jan 19, 2024
1 parent 02086f1 commit e72cd97
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ Now, for a multi-valued feature, the values are properly displayed and the delet
- https://github.com/eclipse-sirius/sirius-web/issues/2912[#2912] [diagram] Send all requested node descriptions to the frontend when requested.
- https://github.com/eclipse-sirius/sirius-web/issues/2678[#2678] [diagram] Fix an issue where tools from the diagram palette where not executed.
- https://github.com/eclipse-sirius/sirius-web/issues/2943[#2943] [view] Fix an issue where the default colors were not applied to sub-nodes and border nodes.
- https://github.com/eclipse-sirius/sirius-web/issues/2957[#2957] [diagram] Fix an issue where childs of custom node lose their position.

=== New Features

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class EllipseNodeLayoutHandler implements INodeLayoutHandler<NodeData> {
// Update children position to be under the label and at the right padding.
directNodesChildren.forEach((child, index) => {
const previousNode = (previousDiagram?.nodes ?? []).find((previouseNode) => previouseNode.id === child.id);
const previousPosition = computePreviousPosition(previousNode, node);
const previousPosition = computePreviousPosition(previousNode, child);
const createdNode = newlyAddedNode?.id === child.id ? newlyAddedNode : undefined;

if (!!createdNode) {
Expand Down

0 comments on commit e72cd97

Please sign in to comment.