victory-brush-container
Advanced tools
Comparing version 30.1.0 to 30.2.0
@@ -398,2 +398,3 @@ import _mapValues from "lodash/mapValues"; | ||
onBrushDomainChange = targetProps.onBrushDomainChange, | ||
onBrushCleared = targetProps.onBrushCleared, | ||
domain = targetProps.domain, | ||
@@ -413,5 +414,9 @@ allowResize = targetProps.allowResize, | ||
if (_isFunction(onBrushDomainChange)) { | ||
onBrushDomainChange(domain, _defaults({}, mutatedProps, targetProps)); | ||
onBrushDomainChange(currentDomain, _defaults({}, mutatedProps, targetProps)); | ||
} | ||
if (_isFunction(onBrushCleared)) { | ||
onBrushCleared(currentDomain, _defaults({}, mutatedProps, targetProps)); | ||
} | ||
return [{ | ||
@@ -418,0 +423,0 @@ target: "parent", |
@@ -167,2 +167,3 @@ import _defaults from "lodash/defaults"; | ||
handleWidth: PropTypes.number, | ||
onBrushCleared: PropTypes.func, | ||
onBrushDomainChange: PropTypes.func | ||
@@ -169,0 +170,0 @@ }) |
@@ -416,2 +416,3 @@ "use strict"; | ||
onBrushDomainChange = targetProps.onBrushDomainChange, | ||
onBrushCleared = targetProps.onBrushCleared, | ||
domain = targetProps.domain, | ||
@@ -431,5 +432,9 @@ allowResize = targetProps.allowResize, | ||
if ((0, _isFunction2.default)(onBrushDomainChange)) { | ||
onBrushDomainChange(domain, (0, _defaults2.default)({}, mutatedProps, targetProps)); | ||
onBrushDomainChange(currentDomain, (0, _defaults2.default)({}, mutatedProps, targetProps)); | ||
} | ||
if ((0, _isFunction2.default)(onBrushCleared)) { | ||
onBrushCleared(currentDomain, (0, _defaults2.default)({}, mutatedProps, targetProps)); | ||
} | ||
return [{ | ||
@@ -436,0 +441,0 @@ target: "parent", |
@@ -180,2 +180,3 @@ "use strict"; | ||
handleWidth: _propTypes.default.number, | ||
onBrushCleared: _propTypes.default.func, | ||
onBrushDomainChange: _propTypes.default.func | ||
@@ -182,0 +183,0 @@ }) |
{ | ||
"name": "victory-brush-container", | ||
"version": "30.1.0", | ||
"version": "30.2.0", | ||
"description": "Interactive Brush Component for Victory", | ||
@@ -24,3 +24,3 @@ "keywords": [ | ||
"prop-types": "^15.5.8", | ||
"victory-core": "^30.1.0" | ||
"victory-core": "^30.2.0" | ||
}, | ||
@@ -27,0 +27,0 @@ "scripts": { |
@@ -247,3 +247,3 @@ import { Selection } from "victory-core"; | ||
const { | ||
x1, y1, x2, y2, onBrushDomainChange, domain, allowResize, defaultBrushArea | ||
x1, y1, x2, y2, onBrushDomainChange, onBrushCleared, domain, allowResize, defaultBrushArea | ||
} = targetProps; | ||
@@ -256,4 +256,7 @@ // if the mouse hasn't moved since a mouseDown event, select the whole domain region | ||
if (isFunction(onBrushDomainChange)) { | ||
onBrushDomainChange(domain, defaults({}, mutatedProps, targetProps)); | ||
onBrushDomainChange(currentDomain, defaults({}, mutatedProps, targetProps)); | ||
} | ||
if (isFunction(onBrushCleared)) { | ||
onBrushCleared(currentDomain, defaults({}, mutatedProps, targetProps)); | ||
} | ||
return [{ | ||
@@ -260,0 +263,0 @@ target: "parent", |
@@ -27,2 +27,3 @@ import PropTypes from "prop-types"; | ||
handleWidth: PropTypes.number, | ||
onBrushCleared: PropTypes.func, | ||
onBrushDomainChange: PropTypes.func | ||
@@ -29,0 +30,0 @@ }; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1212550
22375
Updatedvictory-core@^30.2.0