Skip to content

Commit bb5ba64

Browse files
authored
fix #1258; voronoi mark styles (#1259)
1 parent 994b534 commit bb5ba64

File tree

3 files changed

+1032
-688
lines changed

3 files changed

+1032
-688
lines changed

src/marks/delaunay.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ class Voronoi extends Mark {
230230
const [cx, cy] = applyFrameAnchor(this, dimensions);
231231
const xi = X ? (i) => X[i] : constant(cx);
232232
const yi = Y ? (i) => Y[i] : constant(cy);
233+
const mark = this;
233234

234235
function cells(index) {
235236
const delaunay = Delaunay.from(index, xi, yi);
@@ -239,9 +240,9 @@ class Voronoi extends Mark {
239240
.data(index)
240241
.enter()
241242
.append("path")
242-
.call(applyDirectStyles, this)
243+
.call(applyDirectStyles, mark)
243244
.attr("d", (_, i) => voronoi.renderCell(i))
244-
.call(applyChannelStyles, this, channels);
245+
.call(applyChannelStyles, mark, channels);
245246
}
246247

247248
return create("svg:g", context)

0 commit comments

Comments
 (0)