@@ -54,6 +54,10 @@ module.exports = function plot(gd, calcdata) {
54
54
. classed ( 'tableControlView' , true )
55
55
. style ( 'box-sizing' , 'content-box' )
56
56
. on ( 'mousemove' , function ( ) { tableControlView . call ( renderScrollbarKit ) ; } )
57
+ . on ( 'mousewheel' , function ( d ) {
58
+ d3 . event . preventDefault ( ) ;
59
+ makeDragRow ( gd , tableControlView , null , d . scrollY + d3 . event . deltaY ) ( d ) ;
60
+ } )
57
61
. call ( renderScrollbarKit ) ;
58
62
59
63
tableControlView
@@ -77,6 +81,8 @@ module.exports = function plot(gd, calcdata) {
77
81
var movedColumn = d3 . select ( this ) ;
78
82
easeColumn ( movedColumn , d , - c . uplift ) ;
79
83
raiseToTop ( this ) ;
84
+ d . calcdata . columnDragInProgress = true ;
85
+ renderScrollbarKit ( tableControlView ) ;
80
86
return d ;
81
87
} )
82
88
. on ( 'drag' , function ( d ) {
@@ -102,6 +108,7 @@ module.exports = function plot(gd, calcdata) {
102
108
var movedColumn = d3 . select ( this ) ;
103
109
var p = d . calcdata ;
104
110
d . x = d . xScale ( d ) ;
111
+ d . calcdata . columnDragInProgress = false ;
105
112
easeColumn ( movedColumn , d , 0 ) ;
106
113
columnMoved ( gd , calcdata , p . key , p . columns . map ( function ( dd ) { return dd . xIndex ; } ) ) ;
107
114
} )
@@ -270,7 +277,7 @@ function renderScrollbarKit(tableControlView) {
270
277
. attr ( 'y2' , function ( d ) {
271
278
return d . scrollbarState . barLength - c . scrollbarWidth / 2 ;
272
279
} )
273
- . attr ( 'stroke-opacity' , 0.4 ) ;
280
+ . attr ( 'stroke-opacity' , function ( d ) { return d . columnDragInProgress ? 0 : 0.4 } ) ;
274
281
275
282
// cancel transition: possible pending (also, delayed) transition
276
283
scrollbarGlyph
0 commit comments