Skip to content

Commit

Permalink
fix: fix nested treemap position issue
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Feb 8, 2021
1 parent d7e7553 commit 5af8a1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/public/js/support/menu-support.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ let MenuSupport = {
d3.select(svgId)
.append('g')
.attr('class', "contextMenu")
.attr('transform', 'translate(' + (width - 600) + ',-' + (height + 100) + ')')
.attr('transform', 'translate(0, 10)')
.selectAll('tmp')
.data(menuItems).enter()
.append('g').attr('class', "menuEntry")
Expand Down Expand Up @@ -62,7 +62,7 @@ let MenuSupport = {
});
},
createContextMenu: function (event, d, menuItems, width, height, svgId) {
MenuSupport.menuFactory(event.pageX - width / 2, event.pageY - height / 1.5, menuItems, d, svgId, width, height);
MenuSupport.menuFactory(event.layerX, event.layerY, menuItems, d, svgId, width, height);
event.preventDefault();
}
}

0 comments on commit 5af8a1d

Please sign in to comment.