Skip to content

Commit

Permalink
[2706] Fix children position on re-open
Browse files Browse the repository at this point in the history
Bug: #2706
Signed-off-by: Guillaume Coutable <guillaume.coutable@obeo.fr>
  • Loading branch information
gcoutable authored and sbegaudeau committed Dec 1, 2023
1 parent 8fbea06 commit 9110bc8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.adoc
Expand Up @@ -128,12 +128,13 @@ It uses our algorithm instead of elk.js to perform the arrange-all.
- https://github.com/eclipse-sirius/sirius-web/issues/2640[#2640] [diagram] Compute the handle position on diagram conversion, which happens every time a diagram refresh payload is received.
- https://github.com/eclipse-sirius/sirius-web/issues/2647[#2647] [diagram] Split border shorthand CSS properties into non-shorthand properties for list nodes.
Make some border node transparent when the node is in a list node in the convert engine.
- https://github.com/eclipse-sirius/sirius-web/issues/2646[#2646] [diagram] Fix an issue where the palette was re rendering too much.
- https://github.com/eclipse-sirius/sirius-web/issues/2646[#2646] [diagram] Fix an issue where the palette was re-rendering too much.
- https://github.com/eclipse-sirius/sirius-web/issues/2685[#2685] [diagram] Fix direct edit of edge labels with F2.
- https://github.com/eclipse-sirius/sirius-web/issues/2464[#2464] [diagram] Apply the fit-to-screen after the first layout
- https://github.com/eclipse-sirius/sirius-web/issues/2703[#2703] [diagram] Remove the explorer menu used to export diagrams as SVG image.
This menu was using Sprotty export, which has been replaced by ReactFlow by default (see https://github.com/eclipse-sirius/sirius-web/issues/2671[#2671]).
The only way to export diagram as SVG image is to use the ReactFlow toolbar located at the top left of each diagram.
- https://github.com/eclipse-sirius/sirius-web/issues/2706[#2706] [diagram] Fix an issue where node children were not correctly positioned.

=== New Features

Expand Down
Expand Up @@ -92,7 +92,7 @@ export class RectangleNodeLayoutHandler implements INodeLayoutHandler<Rectangula
// 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 9110bc8

Please sign in to comment.