display contextmenu 1px away from mouse

pull/248/head
nightwing 2016-02-01 20:22:36 +04:00
rodzic 3585e2db30
commit 26a9c07b6a
2 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -1764,11 +1764,11 @@ define(function(require, exports, module) {
// Set Gutter Context Menu // Set Gutter Context Menu
if (ui.isChildOf(gutter, target, true)) { if (ui.isChildOf(gutter, target, true)) {
mnuGutter.show(e.x, e.y); mnuGutter.show(e.x, e.y, "context");
} }
// Set main Ace Context Menu // Set main Ace Context Menu
else { else {
mnuAce.show(e.x, e.y); mnuAce.show(e.x, e.y, "context");
} }
return false; return false;
}); });

Wyświetl plik

@ -946,7 +946,9 @@ define(function(require, exports, module) {
aml.removeChild(item.aml); aml.removeChild(item.aml);
} }
function show(x, y) { function show(x, y, type) {
if (type == "context")
y++;
lastCoords = { x : x, y : y }; lastCoords = { x : x, y : y };
aml.display(x, y); aml.display(x, y);
} }