8000 separate mock for wrapped text; fixing a scrolling issue · monfera/plotly.js@7186527 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7186527

Browse files
committed
separate mock for wrapped text; fixing a scrolling issue
1 parent f8e7647 commit 7186527

File tree

3 files changed

+105
-3
lines changed

3 files changed

+105
-3
lines changed

src/traces/table/plot.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,20 @@ module.exports = function plot(gd, calcdata) {
6767
tableControlView
6868
.attr('transform', function(d) {return 'translate(' + d.size.l + ' ' + d.size.t + ')';});
6969

70+
// scrollBackground merely ensures that mouse events are captured even on crazy fast scrollwheeling
71+
// otherwise rendering glitches may occur
72+
var scrollBackground = tableControlView.selectAll('.scrollBackground')
73+
.data(gup.repeat, gup.keyFun);
74+
75+
scrollBackground.enter()
76+
.append('rect')
77+
.classed('scrollBackground', true)
78+
.attr('fill', 'none');
79+
80+
scrollBackground
81+
.attr('width', function(d) {return d.width;})
82+
.attr('height', function(d) {return d.height;});
83+
7084
if(!c.clipView) {
7185
tableControlView.attr('clip-path', function(d) {return 'url(#scrollAreaBottomClip_' + d.key + ')';});
7286
}

0 commit comments

Comments
 (0)
0