Skip to content
Browse files

Positioning was relying on a wrong offset parent

  • Loading branch information...
1 parent 00ba071 commit a357eb4bd01cd5b73e08de85a65680d452d04801 @Lukx Lukx committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 web/js/networkGraph.js
View
4 web/js/networkGraph.js
@@ -530,13 +530,13 @@
detailOverlay.setCommit( this.data('commit'))
.show();
- var xPos = evt.pageX - commitsGraph.position().left + commitsGraph.scrollLeft() - (detailOverlay.outerWidth()/2);
+ var xPos = evt.pageX - commitsGraph.offset().left + commitsGraph.scrollLeft() - (detailOverlay.outerWidth()/2);
// check that x doesn't run out the viewport
xPos = Math.max( xPos, commitsGraph.scrollLeft() + 10);
xPos = Math.min( xPos, commitsGraph.scrollLeft() + commitsGraph.width() - detailOverlay.outerWidth() - 10);
detailOverlay.positionTo( xPos,
- evt.pageY - commitsGraph.position().top + commitsGraph.scrollTop() + 10);
+ evt.pageY - commitsGraph.offset().top + commitsGraph.scrollTop() + 10);
}
function handleCommitMouseout(evt) {

0 comments on commit a357eb4

Please sign in to comment.
Something went wrong with that request. Please try again.