Merge pull request #3572 from jumpserver/dev_bai

[Update] 修改右击节点rMenu菜单show offset
pull/3575/head
BaiJiangJie 2019-12-27 16:59:30 +08:00 committed by GitHub
commit b64ae358fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -216,8 +216,9 @@ function OnRightClick(event, treeId, treeNode) {
function showRMenu(type, x, y) {
var offset = $("#tree-node-id").offset();
var scrollTop = document.querySelector('.treebox').scrollTop;
x -= offset.left;
y -= offset.top;
y -= offset.top + scrollTop;
x += document.body.scrollLeft;
y += document.body.scrollTop + document.documentElement.scrollTop;
rMenu.css({"top":y+"px", "left":x+"px", "visibility":"visible"});