From 18eac65c92742a578d7f0c368f9b900af269f1ce Mon Sep 17 00:00:00 2001 From: Oleg Sh Date: Sat, 14 May 2022 16:18:45 +0200 Subject: [PATCH] Fix context menu for some cases. --- script/EventHandlers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/EventHandlers.js b/script/EventHandlers.js index c3fd8e3..260db22 100644 --- a/script/EventHandlers.js +++ b/script/EventHandlers.js @@ -271,7 +271,7 @@ BaseHandler.prototype.addContextMenu = function() }); $("body").on("contextmenu", "canvas", function(e) { - handler.contextMenuPoint = {x: e.offsetX, y: e.offsetY}; + handler.contextMenuPoint = handler.app.getMousePos(handler.app.canvas, e); handler.contextMenuObject = handler.GetSelectedObject(handler.contextMenuPoint); if (handler.contextMenuObject instanceof BaseVertex) { $("#edgeContextMenu").hide();