Skip to content

Commit

Permalink
[3217] Remove helper lines computation on pinned node
Browse files Browse the repository at this point in the history
Bug: #3217
Signed-off-by: Florian ROUËNÉ <florian.rouene@obeosoft.com>
  • Loading branch information
frouene authored and AxelRICHARD committed Mar 12, 2024
1 parent 1bbcd3e commit 72a3727
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 28 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Expand Up @@ -98,6 +98,7 @@ The implemented fix does not allow to evaluate an AQL expression, but only to re
- https://github.com/eclipse-sirius/sirius-web/issues/2825[#2825] [diagram] Fix an issue where a click on the text during direct edit opened the palette instead of change the caret position.
- https://github.com/eclipse-sirius/sirius-web/issues/3185[#3185] [diagram] Fix an issue where child nodes were used in helper lines computation of container.
- https://github.com/eclipse-sirius/sirius-web/issues/3149[#3149] [diagram] Fix an issue where newly created border nodes could overlap existing one
- https://github.com/eclipse-sirius/sirius-web/issues/3217[#3217] [diagram] Prevent helper lines to be displayed on moving a pinned node

=== New Features

Expand Down
Expand Up @@ -23,33 +23,8 @@ export const HelperLinesIconOff = (props: SvgIconProps) => {
role="img"
{...props}>
<path d="M22,11V9h-7V2h-2v7h-2V2H9v7H2v2h7v2H2v2h7v7h2v-7h2v7h2v-7h7v-2h-7v-2H22z M13,13h-2v-2h2V13z" />
<line
fill="none"
id="svg_10"
stroke="#757575"
stroke-dasharray="null"
stroke-linecap="null"
stroke-linejoin="null"
stroke-opacity="null"
stroke-width="2"
x1="3"
x2="20"
y1="3.5"
y2="21"
/>
<line
fill="none"
id="svg_12"
stroke="#ffffff"
stroke-dasharray="null"
stroke-linecap="null"
stroke-linejoin="null"
stroke-width="1.75"
x1="4.12"
x2="21.06"
y1="2.42"
y2="19.78"
/>
<line fill="none" id="svg_10" stroke="#757575" strokeWidth="2" x1="3" x2="20" y1="3.5" y2="21" />
<line fill="none" id="svg_12" stroke="#ffffff" strokeWidth="1.75" x1="4.12" x2="21.06" y1="2.42" y2="19.78" />
</SvgIcon>
);
};
Expand Up @@ -135,7 +135,7 @@ export const useHelperLines = (): UseHelperLinesValue => {
const change = changes[0];
if (isMove(change)) {
const movingNode = getNodes().find((node) => node.id === change.id);
if (movingNode) {
if (movingNode && !movingNode.data.pinned) {
const helperLines: HelperLines = getHelperLines(change, movingNode, getNodes());
setState({ vertical: helperLines.vertical, horizontal: helperLines.horizontal });
let snapOffsetX: number = 0;
Expand Down

0 comments on commit 72a3727

Please sign in to comment.