Skip to content

Commit 2be591f

Browse files
committed
removed clipView debug option
1 parent b14f6c6 commit 2be591f

File tree

2 files changed

+10
-26
lines changed

2 files changed

+10
-26
lines changed

src/traces/table/constants.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,5 @@ module.exports = {
2828
scrollbarCaptureWidth: 18,
2929
scrollbarOffset: 5,
3030
scrollbarHideDelay: 1000,
31-
scrollbarHideDuration: 1000,
32-
clipView: false
31+
scrollbarHideDuration: 1000
3332
};

src/traces/table/plot.js

+9-24
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ var splitData = require('./data_split_helpers');
2020

2121
module.exports = function plot(gd, wrappedTraceHolders) {
2222

23-
if(c.clipView) {
24-
gd._fullLayout._paper.attr('height', 2000);
25-
}
26-
2723
var table = gd._fullLayout._paper.selectAll('.table')
2824
.data(wrappedTraceHolders.map(function(wrappedTraceHolder) {
2925
var traceHolder = gup.unwrap(wrappedTraceHolder);
@@ -42,7 +38,7 @@ module.exports = function plot(gd, wrappedTraceHolders) {
4238
.style('left', 0)
4339
.style('overflow', 'visible')
4440
.style('shape-rendering', 'crispEdges')
45-
.style('pointer-events', 'all'); // todo restore 'none'
41+
.style('pointer-events', 'all');
4642

4743
table
4844
.attr('width', function(d) {return d.width + d.size.l + d.size.r;})
@@ -86,9 +82,7 @@ module.exports = function plot(gd, wrappedTraceHolders) {
8682
.attr('width', function(d) {return d.width;})
8783
.attr('height', function(d) {return d.height;});
8884

89-
if(!c.clipView) {
90-
tableControlView.attr('clip-path', function(d) {return 'url(#scrollAreaBottomClip_' + d.key + ')';});
91-
}
85+
tableControlView.attr('clip-path', function(d) {return 'url(#scrollAreaBottomClip_' + d.key + ')';});
9286

9387
var yColumn = tableControlView.selectAll('.yColumn')
9488
.data(function(vm) {return vm.columns;}, gup.keyFun);
@@ -139,9 +133,7 @@ module.exports = function plot(gd, wrappedTraceHolders) {
139133
})
140134
);
141135

142-
if(!c.clipView) {
143-
yColumn.attr('clip-path', function(d) {return 'url(#columnBoundaryClippath_' + d.calcdata.key + '_' + d.specIndex + ')';});
144-
}
136+
yColumn.attr('clip-path', function(d) {return 'url(#columnBoundaryClippath_' + d.calcdata.key + '_' + d.specIndex + ')';});
145137

146138
var columnBlock = yColumn.selectAll('.columnBlock')
147139
.data(splitData.splitToPanels, gup.keyFun);
@@ -180,7 +172,7 @@ module.exports = function plot(gd, wrappedTraceHolders) {
180172
.data(gup.repeat, gup.keyFun);
181173

182174
scrollAreaClip.enter()
183-
.append(c.clipView ? 'g' : 'clipPath')
175+
.append('clipPath')
184176
.classed('scrollAreaClip', true)
185177
.attr('id', function(d) { return 'scrollAreaBottomClip_' + d.key;});
186178

@@ -192,10 +184,7 @@ module.exports = function plot(gd, wrappedTraceHolders) {
192184
.classed('scrollAreaClipRect', true)
193185
.attr('x', -c.overdrag)
194186
.attr('y', -c.uplift)
195-
.attr('stroke', 'orange')
196-
.attr('stroke-width', 2)
197-
.attr('fill', 'none')
198-
.style('pointer-events', 'stroke');
187+
.attr('fill', 'none');
199188

200189
scrollAreaClipRect
201190
.attr('width', function(d) {return d.width + 2 * c.overdrag;})
@@ -213,7 +202,7 @@ module.exports = function plot(gd, wrappedTraceHolders) {
213202

214203
// SVG spec doesn't mandate wrapping into a <defs> and doesn't seem to cause a speed difference
215204
columnBoundaryClippath.enter()
216-
.append(c.clipView ? 'g' : 'clipPath')
205+
.append('clipPath')
217206
.classed('columnBoundaryClippath', true);
218207

219208
columnBoundaryClippath
@@ -227,8 +216,7 @@ module.exports = function plot(gd, wrappedTraceHolders) {
227216
.classed('columnBoundaryRect', true)
228217
.attr('fill', 'none')
229218
.attr('stroke', 'magenta')
230-
.attr('stroke-width', 2)
231-
.style('pointer-events', 'stroke');
219+
.attr('stroke-width', 2);
232220

233221
columnBoundaryRect
234222
.attr('width', function(d) {return d.columnWidth;})
@@ -328,10 +316,9 @@ function renderScrollbarKit(tableControlView, gd) {
328316
scrollbarCaptureZone.enter()
329317
.append('line')
330318
.classed('scrollbarCaptureZone', true)
331-
.attr('stroke', 'red')
319+
.attr('stroke', 'rgba(0,0,0,0.01)')
332320
.attr('stroke-width', c.scrollbarCaptureWidth)
333321
.attr('stroke-linecap', 'butt')
334-
.attr('stroke-opacity', c.clipView ? 0.5 : 0)
335322
.attr('y1', 0)
336323
.on('mousedown', function(d) {
337324
var y = d3.event.y;
@@ -477,9 +464,7 @@ function sizeAndStyleRect(cellRect) {
477464
.attr('width', function(d) {return d.column.columnWidth;})
478465
.attr('stroke-width', function(d) {return d.cellBorderWidth;})
479466
.attr('stroke', function(d) {
480-
return c.clipView ?
481-
({header: 'blue', cells1: 'red', cells2: 'green'})[d.column.key] :
482-
gridPick(d.calcdata.cells.line.color, d.column.specIndex, d.rowNumber);
467+
return gridPick(d.calcdata.cells.line.color, d.column.specIndex, d.rowNumber);
483468
})
484469
.attr('fill', function(d) {
485470
return d.calcdata.cells.fill ? gridPick(d.calcdata.cells.fill.color, d.column.specIndex, d.rowNumber) : 'none';

0 commit comments

Comments
 (0)