Skip to content

Commit 93e5ce3

Browse files
committed
use the data directly
1 parent 7b75faf commit 93e5ce3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/marks/brush.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ export class Brush extends Mark {
2020
super(
2121
data,
2222
[
23-
{name: "picker", value: identity},
2423
{name: "x", value: x, scale: "x", optional: true},
2524
{name: "y", value: y, scale: "y", optional: true}
2625
],
@@ -32,7 +31,7 @@ export class Brush extends Mark {
3231
render(
3332
I,
3433
{x, y},
35-
{x: X, y: Y, picker: J},
34+
{x: X, y: Y},
3635
{marginLeft, width, marginRight, marginTop, height, marginBottom}
3736
) {
3837
let svg;
@@ -59,7 +58,7 @@ export class Brush extends Mark {
5958
index = index.filter(i => Y[i] >= y0 && Y[i] <= y1);
6059
}
6160
}
62-
const dots = selection ? Array.from(index, i => J[i]) : data;
61+
const dots = selection ? Array.from(index, i => data[i]) : data;
6362

6463
if (svg) {
6564
svg.value = dots;
@@ -84,7 +83,7 @@ export class Brush extends Mark {
8483
if (!svg.__brushes) svg.__brushes = [];
8584
svg.__brushes.push({b: brush, g});
8685

87-
// initial setup works only on one facet
86+
// initial setup works only on the first facet
8887
if (svg.__brushes.length === 1) {
8988
if (this.initialSelection) {
9089
const s = this.initialSelection;

0 commit comments

Comments
 (0)