@@ -113,9 +113,9 @@ const generateOEndMappingFn = projectedColumns => (d): null | Array<any> => {
113
113
const lastColumn : { x : number ; width : number } = foundColumns [
114
114
foundColumns . length - 1
115
115
] || {
116
- x : 0 ,
117
- width : 0
118
- }
116
+ x : 0 ,
117
+ width : 0
118
+ }
119
119
120
120
const columnPosition = [
121
121
firstColumn . x + Math . min ( 5 , firstColumn . width / 10 ) ,
@@ -261,7 +261,7 @@ class InteractionLayer extends React.Component<Props, State> {
261
261
this . props . interaction . during ( e , columnName , data , columnData )
262
262
}
263
263
264
- brushEnd = ( e ?: number [ ] | number [ ] [ ] , columnName ?: string , data ?: object , columnData ?: object ) => {
264
+ brushEnd = ( e ?: number [ ] | number [ ] [ ] , columnName ?: string , data ?: object , columnData ?: object ) => {
265
265
if ( this . props . interaction && this . props . interaction . end )
266
266
this . props . interaction . end ( e , columnName , data , columnData )
267
267
}
@@ -288,16 +288,20 @@ class InteractionLayer extends React.Component<Props, State> {
288
288
: "xBrush"
289
289
: interaction . brush
290
290
291
- const {
291
+ let {
292
+ extent
293
+ } = interaction
294
+
295
+ if ( ! extent ) {
292
296
extent = actualBrush === "xyBrush"
293
297
? [
294
- [ xScale . invert ( 0 ) , yScale . invert ( 0 ) ] ,
295
- [ xScale . invert ( size [ 0 ] ) , yScale . invert ( size [ 1 ] ) ]
296
- ]
298
+ [ xScale . invert ( 0 ) , yScale . invert ( 0 ) ] ,
299
+ [ xScale . invert ( size [ 0 ] ) , yScale . invert ( size [ 1 ] ) ]
300
+ ]
297
301
: actualBrush === "xBrush"
298
- ? [ xScale . invert ( 0 ) , xScale . invert ( size [ 0 ] ) ]
299
- : [ yScale . invert ( 0 ) , yScale . invert ( size [ 1 ] ) ]
300
- } = interaction
302
+ ? [ xScale . invert ( 0 ) , xScale . invert ( size [ 0 ] ) ]
303
+ : [ yScale . invert ( 0 ) , yScale . invert ( size [ 1 ] ) ]
304
+ }
301
305
302
306
if ( extent . indexOf && extent . indexOf ( undefined ) !== - 1 ) {
303
307
return < g />
@@ -363,7 +367,7 @@ class InteractionLayer extends React.Component<Props, State> {
363
367
selectedExtent = [
364
368
projectedColumns [ leftExtent ] . x ,
365
369
projectedColumns [ rightExtent ] . x +
366
- projectedColumns [ rightExtent ] . width
370
+ projectedColumns [ rightExtent ] . width
367
371
]
368
372
}
369
373
}
@@ -446,8 +450,8 @@ class InteractionLayer extends React.Component<Props, State> {
446
450
showLinePoints && d [ whichPoints [ showLinePoints ] ] !== undefined
447
451
? d [ whichPoints [ showLinePoints ] ]
448
452
: d [ projectedYMiddle ] !== undefined
449
- ? d [ projectedYMiddle ]
450
- : d [ projectedY ]
453
+ ? d [ projectedYMiddle ]
454
+ : d [ projectedY ]
451
455
)
452
456
)
453
457
if (
@@ -653,9 +657,9 @@ class InteractionLayer extends React.Component<Props, State> {
653
657
return ! d
654
658
? null
655
659
: [
656
- rScaleReverse ( rScale . invert ( d [ 1 ] ) ) ,
657
- rScaleReverse ( rScale . invert ( d [ 0 ] ) )
658
- ]
660
+ rScaleReverse ( rScale . invert ( d [ 1 ] ) ) ,
661
+ rScaleReverse ( rScale . invert ( d [ 0 ] ) )
662
+ ]
659
663
}
660
664
661
665
const rRange = rScale . range ( )
0 commit comments