@@ -22,7 +22,7 @@ var depthLimitEpsilon = 1e-6;
22
22
var maskHeight = 2048 ;
23
23
24
24
var dummyPixel = new Uint8Array ( 4 ) ;
25
- var pickPixel = new Uint8Array ( 4 ) ;
25
+ var dataPixel = new Uint8Array ( 4 ) ;
26
26
27
27
var paletteTextureConfig = {
28
28
shape : [ 256 , 1 ] ,
@@ -223,8 +223,8 @@ function expandedPixelRange(bounds) {
223
223
224
224
module . exports = function ( canvasGL , d ) {
225
225
// context & pick describe which canvas we're talking about - won't change with new data
226
- var context = d . context ;
227
- var pick = d . pick ;
226
+ var isContext = d . context ;
227
+ var isPick = d . pick ;
228
228
229
229
var regl = d . regl ;
230
230
@@ -252,7 +252,7 @@ module.exports = function(canvasGL, d) {
252
252
profile : false ,
253
253
254
254
blend : {
255
- enable : context ,
255
+ enable : isContext ,
256
256
func : {
257
257
srcRGB : 'src alpha' ,
258
258
dstRGB : 'one minus src alpha' ,
@@ -267,7 +267,7 @@ module.exports = function(canvasGL, d) {
267
267
} ,
268
268
269
269
depth : {
270
- enable : ! context ,
270
+ enable : ! isContext ,
271
271
mask : true ,
272
272
func : 'less' ,
273
273
range : [ 0 , 1 ]
@@ -342,12 +342,12 @@ module.exports = function(canvasGL, d) {
342
342
sampleCount = initialDims [ 0 ] ? initialDims [ 0 ] . values . length : 0 ;
343
343
344
344
var lines = model . lines ;
345
- var color = pick ? lines . color . map ( function ( _ , i ) { return i / lines . color . length ; } ) : lines . color ;
345
+ var color = isPick ? lines . color . map ( function ( _ , i ) { return i / lines . color . length ; } ) : lines . color ;
346
346
347
347
var points = makePoints ( sampleCount , initialDims , color ) ;
348
348
setAttributes ( attributes , sampleCount , points ) ;
349
349
350
- if ( ! context && ! pick ) {
350
+ if ( ! isContext && ! isPick ) {
351
351
paletteTexture = regl . texture ( Lib . extendFlat ( {
352
352
data : palette ( model . unitToColor , 255 )
353
353
} , paletteTextureConfig ) ) ;
@@ -441,7 +441,7 @@ module.exports = function(canvasGL, d) {
441
441
// clear canvas here, as the panel iteration below will not enter the loop body
442
442
clear ( regl , 0 , 0 , model . canvasWidth , model . canvasHeight ) ;
443
443
}
444
- var constraints = makeConstraints ( context ) ;
444
+ var constraints = makeConstraints ( isContext ) ;
445
445
446
446
for ( i = 0 ; i < panelCount ; i ++ ) {
447
447
var p = panels [ i ] ;
@@ -463,7 +463,7 @@ module.exports = function(canvasGL, d) {
463
463
p . panelSizeX , p . panelSizeY ,
464
464
p . dim0 . crossfilterDimensionIndex ,
465
465
constraints ,
466
- context ? 0 : pick ? 2 : 1
466
+ isContext ? 0 : isPick ? 2 : 1
467
467
) ;
468
468
469
469
renderState . clearOnly = clearOnly ;
@@ -482,9 +482,9 @@ module.exports = function(canvasGL, d) {
482
482
y : canvasY ,
483
483
width : 1 ,
484
484
height : 1 ,
485
- data : pickPixel
485
+ data : dataPixel
486
486
} ) ;
487
- return pickPixel ;
487
+ return dataPixel ;
488
488
}
489
489
490
490
function readPixels ( canvasX , canvasY , width , height ) {
0 commit comments