victory-voronoi-container
Advanced tools
Comparing version 35.8.1 to 35.8.4
@@ -17,3 +17,3 @@ import _isRegExp from "lodash/isRegExp"; | ||
import { Selection, Data, Helpers } from "victory-core"; | ||
import { Collection, Selection, Data, Helpers } from "victory-core"; | ||
import isEqual from "react-fast-compare"; | ||
@@ -42,2 +42,6 @@ import Delaunay from "delaunay-find/lib/index.js"; | ||
getDatasets: function (props) { | ||
var minDomain = { | ||
x: Collection.getMinValue(props.domain.x), | ||
y: Collection.getMinValue(props.domain.y) | ||
}; | ||
var children = React.Children.toArray(props.children); | ||
@@ -58,4 +62,4 @@ | ||
return _assign({ | ||
_voronoiX: props.voronoiDimension === "y" ? 0 : voronoiX, | ||
_voronoiY: props.voronoiDimension === "x" ? 0 : voronoiY, | ||
_voronoiX: props.voronoiDimension === "y" ? minDomain.x : voronoiX, | ||
_voronoiY: props.voronoiDimension === "x" ? minDomain.y : voronoiY, | ||
eventKey: index, | ||
@@ -62,0 +66,0 @@ childName: name, |
@@ -62,2 +62,7 @@ "use strict"; | ||
getDatasets: function (props) { | ||
var minDomain = { | ||
x: _victoryCore.Collection.getMinValue(props.domain.x), | ||
y: _victoryCore.Collection.getMinValue(props.domain.y) | ||
}; | ||
var children = _react.default.Children.toArray(props.children); | ||
@@ -78,4 +83,4 @@ | ||
return (0, _assign2.default)({ | ||
_voronoiX: props.voronoiDimension === "y" ? 0 : voronoiX, | ||
_voronoiY: props.voronoiDimension === "x" ? 0 : voronoiY, | ||
_voronoiX: props.voronoiDimension === "y" ? minDomain.x : voronoiX, | ||
_voronoiY: props.voronoiDimension === "x" ? minDomain.y : voronoiY, | ||
eventKey: index, | ||
@@ -82,0 +87,0 @@ childName: name, |
{ | ||
"name": "victory-voronoi-container", | ||
"version": "35.8.1", | ||
"version": "35.8.4", | ||
"description": "Interactive Voronoi Mouseover Component for Victory", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -1,2 +0,2 @@ | ||
import { Selection, Data, Helpers } from "victory-core"; | ||
import { Collection, Selection, Data, Helpers } from "victory-core"; | ||
import { assign, throttle, isFunction, isEmpty, includes, isString, isRegExp } from "lodash"; | ||
@@ -27,2 +27,6 @@ import isEqual from "react-fast-compare"; | ||
getDatasets(props) { | ||
const minDomain = { | ||
x: Collection.getMinValue(props.domain.x), | ||
y: Collection.getMinValue(props.domain.y) | ||
}; | ||
const children = React.Children.toArray(props.children); | ||
@@ -36,6 +40,7 @@ const addMeta = (data, name, child) => { | ||
const voronoiY = (+y + +y0) / 2; | ||
return assign( | ||
{ | ||
_voronoiX: props.voronoiDimension === "y" ? 0 : voronoiX, | ||
_voronoiY: props.voronoiDimension === "x" ? 0 : voronoiY, | ||
_voronoiX: props.voronoiDimension === "y" ? minDomain.x : voronoiX, | ||
_voronoiY: props.voronoiDimension === "x" ? minDomain.y : voronoiY, | ||
eventKey: index, | ||
@@ -42,0 +47,0 @@ childName: name, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
1397220
24530