@@ -53,7 +53,7 @@ module.exports = function plot(gd, calcdata) {
53
53
. append ( 'g' )
54
54
. classed ( 'tableControlView' , true )
55
55
. style ( 'box-sizing' , 'content-box' )
56
- . on ( 'mousemove' , function ( ) { tableControlView . call ( renderScrollbarKit , gd ) ; } )
56
+ . on ( 'mousemove' , function ( d ) { tableControlView . filter ( function ( dd ) { return d === dd ; } ) . call ( renderScrollbarKit , gd ) ; } )
57
57
. on ( 'mousewheel' , function ( d ) {
58
58
if ( d . scrollbarState . wheeling ) return ;
59
59
d . scrollbarState . wheeling = true ;
@@ -100,7 +100,7 @@ module.exports = function plot(gd, calcdata) {
100
100
easeColumn ( movedColumn , d , - c . uplift ) ;
101
101
raiseToTop ( this ) ;
102
102
d . calcdata . columnDragInProgress = true ;
103
- renderScrollbarKit ( tableControlView , gd ) ;
103
+ renderScrollbarKit ( tableControlView . filter ( function ( dd ) { return d . calcdata . key === dd . key ; } ) , gd ) ;
104
104
return d ;
105
105
} )
106
106
. on ( 'drag' , function ( d ) {
@@ -704,7 +704,7 @@ function findPagesAndCacheHeights(blocks, scrollY, scrollHeight) {
704
704
}
705
705
706
706
function updateBlockYPosition ( gd , cellsColumnBlock , tableControlView ) {
707
- var d = cellsColumnBlock . data ( ) [ 0 ] ;
707
+ var d = flatData ( cellsColumnBlock ) [ 0 ] ;
708
708
var blocks = d . rowBlocks ;
709
709
var calcdata = d . calcdata ;
710
710
@@ -736,6 +736,7 @@ function updateBlockYPosition(gd, cellsColumnBlock, tableControlView) {
736
736
cellsColumnBlock
737
737
. attr ( 'transform' , function ( d ) {
738
738
var yTranslate = firstRowAnchor ( d . rowBlocks , d . page ) - d . scrollY ;
739
+ //console.log(d.scrollY, Math.round(yTranslate))
739
740
return 'translate(0 ' + yTranslate + ')' ;
740
741
} ) ;
741
742
@@ -747,8 +748,11 @@ function updateBlockYPosition(gd, cellsColumnBlock, tableControlView) {
747
748
}
748
749
}
749
750
750
- function makeDragRow ( gd , tableControlView , optionalMultiplier , optionalPosition ) {
751
- return function dragRow ( d ) {
751
+ function makeDragRow ( gd , allTableControlView , optionalMultiplier , optionalPosition ) {
752
+ return function dragRow ( eventD ) {
753
+ // may come from whicever DOM event target: drag, wheel, bar... eventD corresponds to event target
754
+ var d = eventD . calcdata ? eventD . calcdata : eventD ;
755
+ var tableControlView = allTableControlView . filter ( function ( dd ) { return d . key === dd . key ; } )
752
756
var multiplier = optionalMultiplier || d . scrollbarState . dragMultiplier ;
753
757
d . scrollY = optionalPosition === void ( 0 ) ? d . scrollY + multiplier * d3 . event . dy : optionalPosition ;
754
758
var cellsColumnBlock = tableControlView . selectAll ( '.yColumn' ) . selectAll ( '.columnBlock' ) . filter ( cellsBlock ) ;
0 commit comments