This repository was archived by the owner on Mar 17, 2020. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4343 dir = direction . apply ( this , args ) ,
4444 nodel = d3 . select ( node ) ,
4545 i = directions . length ,
46- coords
46+ coords ,
47+ scrollTop = document . documentElement . scrollTop || document . body . scrollTop ,
48+ scrollLeft = document . documentElement . scrollLeft || document . body . scrollLeft
4749
4850 nodel . html ( content )
4951 . style ( { opacity : 1 , 'pointer-events' : 'all' } )
5052
5153 while ( i -- ) nodel . classed ( directions [ i ] , false )
5254 coords = direction_callbacks . get ( dir ) . apply ( this )
5355 nodel . classed ( dir , true ) . style ( {
54- top : ( coords . top + poffset [ 0 ] ) + 'px' ,
55- left : ( coords . left + poffset [ 1 ] ) + 'px'
56+ top : ( coords . top + poffset [ 0 ] ) + scrollTop + 'px' ,
57+ left : ( coords . left + poffset [ 1 ] ) + scrollLeft + 'px'
5658 } )
5759
5860 return tip
261263 width = tbbox . width ,
262264 height = tbbox . height ,
263265 x = tbbox . x ,
264- y = tbbox . y ,
265- scrollEl = document . documentElement ? document . documentElement : document . body ,
266- scrollTop = scrollEl . scrollTop ,
267- scrollLeft = scrollEl . scrollLeft
266+ y = tbbox . y
268267
269-
270- point . x = x + scrollLeft
271- point . y = y + scrollTop
268+ point . x = x
269+ point . y = y
272270 bbox . nw = point . matrixTransform ( matrix )
273271 point . x += width
274272 bbox . ne = point . matrixTransform ( matrix )
You can’t perform that action at this time.
0 commit comments