Skip to content

Commit

Permalink
[3934] Remove helper lines when moving pinned elements
Browse files Browse the repository at this point in the history
Bug: #3934
Signed-off-by: Florian ROUËNÉ <florian.rouene@obeosoft.com>
  • Loading branch information
frouene committed Sep 3, 2024
1 parent 07993b3 commit e9434f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ As a result, the following maven modules have been deleted: `sirius-web-sample-a
- https://github.com/eclipse-sirius/sirius-web/issues/3899[#3899] [diagram] Fix an issue when using alt-tab shortcut and trying to drag a node afterwards
- https://github.com/eclipse-sirius/sirius-web/issues/3911[#3911] [diagram] Fix overflow issue with labels, ensuring proper wrapping and ellipsis.
- https://github.com/eclipse-sirius/sirius-web/issues/3933[#3933] [vs-code] Fix explorer in vscode extension
- https://github.com/eclipse-sirius/sirius-web/issues/3934[#3934] [diagram] Remove helper lines when moving pinned elements

=== New Features

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,9 @@ export const useHelperLines = (): UseHelperLinesValue => {
const nodePositionChanges = changes.map((change) => change as NodePositionChange);
const movingNodes: Node[] = nodePositionChanges
.map((change) => nodeInternal.get(change.id))
.filter((node): node is NonNullable<typeof node> => node !== undefined);
if (movingNodes) {
.filter((node): node is NonNullable<typeof node> => node !== undefined)
.filter((node) => !node.data.pinned);
if (movingNodes && movingNodes.length > 0) {
const movingNodesBounds = getRectangularBounds(nodePositionChanges, movingNodes);
const helperLines: HelperLines = getHelperLinesForMove(
movingNodesBounds,
Expand Down

0 comments on commit e9434f5

Please sign in to comment.