Skip to content

Commit

Permalink
#5107 - fixed issues with tails
Browse files Browse the repository at this point in the history
  • Loading branch information
daniil-sloboda committed Aug 30, 2024
1 parent 1ae46d8 commit 5b11d1e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/ketcher-react/src/script/editor/tool/select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ class SelectTool implements Tool {
this.dragCtx,
);
} else if (this.dragCtx.closestItem.map === MULTITAIL_ARROW_KEY) {
this.dragCtx.action = this.reactionArrowMoveTool.mouseup(
this.dragCtx.action = this.multitailArrowMoveTool.mouseup(
event,
this.dragCtx,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,11 @@ export function getMenuPropsForClosestItem(
const closestItemTyped = closestItem as unknown as ReturnType<
ReMultitailArrow['calculateDistanceToPoint']
>;
const tailId = closestItemTyped?.ref?.tailId;
return {
id: CONTEXT_MENU_ID.FOR_MULTITAIL_ARROW,
itemId: closestItem.id,
tailId: closestItemTyped?.ref?.tailId || null,
tailId: typeof tailId === 'number' ? tailId : null,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
fromMultitailArrowTailRemove,
MultitailArrow,
} from 'ketcher-core';
import Editor from '../../../../../editor';
import Editor from 'src/script/editor';

type Params = ItemEventParams<MultitailArrowContextMenuProps>;

Expand Down

0 comments on commit 5b11d1e

Please sign in to comment.