Commit 42c5783e authored by BaiJiangJie's avatar BaiJiangJie

[Update] 修改右击节点rMenu菜单show offset

parent b4cf540e
......@@ -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"});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment