diff --git a/packages/x6/src/registry/tool/vertices.ts b/packages/x6/src/registry/tool/vertices.ts index 1c142f36fc6..4b4c0d38f7a 100644 --- a/packages/x6/src/registry/tool/vertices.ts +++ b/packages/x6/src/registry/tool/vertices.ts @@ -145,6 +145,7 @@ export class Vertices extends ToolsView.ToolItem { edgeView.cell.startBatch('move-vertex', { ui: true, toolId: this.cid }) if (!this.options.stopPropagation) { const { e: evt, x, y } = this.getMouseEventArgs(e) + this.eventData(evt, { start: { x, y } }) edgeView.notifyMouseDown(evt, x, y) } } @@ -202,6 +203,13 @@ export class Vertices extends ToolsView.ToolItem { if (!this.options.stopPropagation) { edgeView.notifyMouseUp(evt, x, y) + const { start } = this.eventData(evt) + if (start) { + const { x: startX, y: startY } = start + if (startX === x && startY === y) { + edgeView.onClick(evt as unknown as Dom.ClickEvent, x, y) + } + } } edgeView.checkMouseleave(evt)