From 92c3bedd63eec0c8a46048f81d5d96ba61e99176 Mon Sep 17 00:00:00 2001 From: Exodus4D Date: Sat, 14 Nov 2015 18:38:45 +0100 Subject: [PATCH] fixed position for "new system" according to current mouse cursor position --- js/app/map/contextmenu.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/app/map/contextmenu.js b/js/app/map/contextmenu.js index 5180b605..f85ee0c5 100644 --- a/js/app/map/contextmenu.js +++ b/js/app/map/contextmenu.js @@ -54,7 +54,7 @@ define([ duration: animationInDuration, complete: function(){ // set context menu "click" observer - $(this).off('click').one('click', {component: component, position:{x: getLeftLocation(originalEvent), y: getTopLocation(originalEvent)}}, function (e) { + $(this).off('click').one('click', {component: component, position:{x: originalEvent.offsetX, y: originalEvent.offsetY}}, function (e) { // hide contextmenu $(this).hide(); @@ -64,7 +64,6 @@ define([ position: e.data.position }; - settings.menuSelected.call(this, params); }); }