@@ -211,11 +211,6 @@ class Voronoi extends Mark {
211
211
}
212
212
}
213
213
214
- function voronoiof ( delaunay , dimensions ) {
215
- const { width, height, marginTop, marginRight, marginBottom, marginLeft} = dimensions ;
216
- return delaunay . voronoi ( [ marginLeft , marginTop , width - marginRight , height - marginBottom ] ) ;
217
- }
218
-
219
214
class VoronoiMesh extends DelaunayMesh {
220
215
constructor ( data , options ) {
221
216
super ( data , options , voronoiMeshDefaults ) ;
@@ -225,7 +220,12 @@ class VoronoiMesh extends DelaunayMesh {
225
220
}
226
221
}
227
222
228
- export function delaunayMark ( DelaunayMark , data , { x, y, ...options } = { } ) {
223
+ function voronoiof ( delaunay , dimensions ) {
224
+ const { width, height, marginTop, marginRight, marginBottom, marginLeft} = dimensions ;
225
+ return delaunay . voronoi ( [ marginLeft , marginTop , width - marginRight , height - marginBottom ] ) ;
226
+ }
227
+
228
+ function delaunayMark ( DelaunayMark , data , { x, y, ...options } = { } ) {
229
229
( [ x , y ] = maybeTuple ( x , y ) ) ;
230
230
return new DelaunayMark ( data , { ...options , x, y} ) ;
231
231
}
@@ -242,7 +242,6 @@ export function hull(data, options) {
242
242
return delaunayMark ( Hull , data , options ) ;
243
243
}
244
244
245
- // TODO voronoiX, voronoiY?
246
245
export function voronoi ( data , options ) {
247
246
return delaunayMark ( Voronoi , data , options ) ;
248
247
}
0 commit comments