victory-bar
Advanced tools
Comparing version 30.3.1 to 30.4.1
import _isFunction from "lodash/isFunction"; | ||
import _isObject from "lodash/isObject"; | ||
import _isPlainObject from "lodash/isPlainObject"; | ||
import _assign from "lodash/assign"; | ||
@@ -239,19 +239,8 @@ | ||
active = props.active; | ||
if (!cornerRadius) { | ||
return { | ||
top: 0, | ||
bottom: 0 | ||
}; | ||
} else if (_isObject(cornerRadius)) { | ||
return { | ||
top: Helpers.evaluateProp(cornerRadius.top, datum, active), | ||
bottom: Helpers.evaluateProp(cornerRadius.bottom, datum, active) | ||
}; | ||
} else { | ||
return { | ||
top: Helpers.evaluateProp(cornerRadius, datum, active), | ||
bottom: 0 | ||
}; | ||
} | ||
var top = _isPlainObject(cornerRadius) ? cornerRadius.top : cornerRadius || 0; | ||
var bottom = _isPlainObject(cornerRadius) ? cornerRadius.bottom : 0; | ||
return { | ||
top: Helpers.evaluateProp(top, datum, active), | ||
bottom: Helpers.evaluateProp(bottom, datum, active) | ||
}; | ||
} | ||
@@ -258,0 +247,0 @@ }, { |
@@ -10,3 +10,3 @@ "use strict"; | ||
var _isObject2 = _interopRequireDefault(require("lodash/isObject")); | ||
var _isPlainObject2 = _interopRequireDefault(require("lodash/isPlainObject")); | ||
@@ -258,19 +258,8 @@ var _assign2 = _interopRequireDefault(require("lodash/assign")); | ||
active = props.active; | ||
if (!cornerRadius) { | ||
return { | ||
top: 0, | ||
bottom: 0 | ||
}; | ||
} else if ((0, _isObject2.default)(cornerRadius)) { | ||
return { | ||
top: _victoryCore.Helpers.evaluateProp(cornerRadius.top, datum, active), | ||
bottom: _victoryCore.Helpers.evaluateProp(cornerRadius.bottom, datum, active) | ||
}; | ||
} else { | ||
return { | ||
top: _victoryCore.Helpers.evaluateProp(cornerRadius, datum, active), | ||
bottom: 0 | ||
}; | ||
} | ||
var top = (0, _isPlainObject2.default)(cornerRadius) ? cornerRadius.top : cornerRadius || 0; | ||
var bottom = (0, _isPlainObject2.default)(cornerRadius) ? cornerRadius.bottom : 0; | ||
return { | ||
top: _victoryCore.Helpers.evaluateProp(top, datum, active), | ||
bottom: _victoryCore.Helpers.evaluateProp(bottom, datum, active) | ||
}; | ||
} | ||
@@ -277,0 +266,0 @@ }, { |
{ | ||
"name": "victory-bar", | ||
"version": "30.3.1", | ||
"version": "30.4.1", | ||
"description": "Bar Component for Victory", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
import React from "react"; | ||
import PropTypes from "prop-types"; | ||
import { Helpers, Path, CommonProps } from "victory-core"; | ||
import { assign, isObject, isFunction } from "lodash"; | ||
import { assign, isPlainObject, isFunction } from "lodash"; | ||
import * as d3Shape from "d3-shape"; | ||
@@ -206,15 +206,8 @@ | ||
const { cornerRadius, datum, active } = props; | ||
if (!cornerRadius) { | ||
return { top: 0, bottom: 0 }; | ||
} else if (isObject(cornerRadius)) { | ||
return { | ||
top: Helpers.evaluateProp(cornerRadius.top, datum, active), | ||
bottom: Helpers.evaluateProp(cornerRadius.bottom, datum, active) | ||
}; | ||
} else { | ||
return { | ||
top: Helpers.evaluateProp(cornerRadius, datum, active), | ||
bottom: 0 | ||
}; | ||
} | ||
const top = isPlainObject(cornerRadius) ? cornerRadius.top : cornerRadius || 0; | ||
const bottom = isPlainObject(cornerRadius) ? cornerRadius.bottom : 0; | ||
return { | ||
top: Helpers.evaluateProp(top, datum, active), | ||
bottom: Helpers.evaluateProp(bottom, datum, active) | ||
}; | ||
} | ||
@@ -221,0 +214,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
1352026
24507