victory-core
Advanced tools
Comparing version 14.0.1 to 14.0.2
VictoryCore Changelog | ||
===================== | ||
## 14.0.1 | ||
## 14.0.2 (2017-02-28) | ||
[208](https://github.com/FormidableLabs/victory-core/pull/208) | ||
- Add `clipPadding` prop to `VictoryClipContainer` to match the prop on `ClipPath` | ||
## 14.0.1 (2017-02-26) | ||
[207](https://github.com/FormidableLabs/victory-core/pull/207) | ||
@@ -7,0 +12,0 @@ - Adds a `translateY` prop for clipPath to support x, y zoom behavior |
@@ -36,2 +36,8 @@ Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();var _react=require("react");var _react2=_interopRequireDefault(_react); | ||
function VictoryClipContainer(props){_classCallCheck(this,VictoryClipContainer);var _this=_possibleConstructorReturn(this,(VictoryClipContainer.__proto__||Object.getPrototypeOf(VictoryClipContainer)).call(this, | ||
@@ -78,6 +84,8 @@ props)); | ||
props,clipId){var | ||
padding=props.padding,translateX=props.translateX,translateY=props.translateY,clipHeight=props.clipHeight,clipWidth=props.clipWidth,clipPathComponent=props.clipPathComponent; | ||
padding= | ||
props.padding,clipPadding=props.clipPadding,translateX=props.translateX,translateY=props.translateY,clipHeight=props.clipHeight,clipWidth=props.clipWidth,clipPathComponent=props.clipPathComponent; | ||
return _react2.default.cloneElement( | ||
clipPathComponent, | ||
{padding:padding,clipId:clipId,translateX:translateX,translateY:translateY,clipWidth:clipWidth,clipHeight:clipHeight}); | ||
{padding:padding,clipPadding:clipPadding,clipId:clipId,translateX:translateX,translateY:translateY,clipWidth:clipWidth,clipHeight:clipHeight}); | ||
@@ -92,2 +100,2 @@ }},{key:"render",value:function render() | ||
return this.renderGroup(this.props); | ||
}}]);return VictoryClipContainer;}(_react2.default.Component);VictoryClipContainer.displayName="VictoryClipContainer";VictoryClipContainer.propTypes={className:_react.PropTypes.string,style:_react.PropTypes.object,padding:_react.PropTypes.oneOfType([_react.PropTypes.number,_react.PropTypes.shape({top:_react.PropTypes.number,bottom:_react.PropTypes.number,left:_react.PropTypes.number,right:_react.PropTypes.number})]),clipHeight:_react.PropTypes.number,clipWidth:_react.PropTypes.number,events:_react.PropTypes.object,children:_react2.default.PropTypes.oneOfType([_react2.default.PropTypes.arrayOf(_react2.default.PropTypes.node),_react2.default.PropTypes.node]),clipPathComponent:_react.PropTypes.element,translateX:_react.PropTypes.number,translateY:_react.PropTypes.number,transform:_react.PropTypes.string};VictoryClipContainer.defaultProps={clipPathComponent:_react2.default.createElement(_index.ClipPath,null)};exports.default=VictoryClipContainer; | ||
}}]);return VictoryClipContainer;}(_react2.default.Component);VictoryClipContainer.displayName="VictoryClipContainer";VictoryClipContainer.propTypes={className:_react.PropTypes.string,style:_react.PropTypes.object,padding:_react.PropTypes.oneOfType([_react.PropTypes.number,_react.PropTypes.shape({top:_react.PropTypes.number,bottom:_react.PropTypes.number,left:_react.PropTypes.number,right:_react.PropTypes.number})]),clipPadding:_react.PropTypes.shape({top:_react.PropTypes.number,bottom:_react.PropTypes.number,left:_react.PropTypes.number,right:_react.PropTypes.number}),clipHeight:_react.PropTypes.number,clipWidth:_react.PropTypes.number,events:_react.PropTypes.object,children:_react2.default.PropTypes.oneOfType([_react2.default.PropTypes.arrayOf(_react2.default.PropTypes.node),_react2.default.PropTypes.node]),clipPathComponent:_react.PropTypes.element,translateX:_react.PropTypes.number,translateY:_react.PropTypes.number,transform:_react.PropTypes.string};VictoryClipContainer.defaultProps={clipPathComponent:_react2.default.createElement(_index.ClipPath,null)};exports.default=VictoryClipContainer; |
{ | ||
"name": "victory-core", | ||
"version": "14.0.1", | ||
"version": "14.0.2", | ||
"description": "Victory Core", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -19,2 +19,8 @@ import React, { PropTypes } from "react"; | ||
]), | ||
clipPadding: PropTypes.shape({ | ||
top: PropTypes.number, | ||
bottom: PropTypes.number, | ||
left: PropTypes.number, | ||
right: PropTypes.number | ||
}), | ||
clipHeight: PropTypes.number, | ||
@@ -78,6 +84,8 @@ clipWidth: PropTypes.number, | ||
renderClipComponent(props, clipId) { | ||
const { padding, translateX, translateY, clipHeight, clipWidth, clipPathComponent } = props; | ||
const { | ||
padding, clipPadding, translateX, translateY, clipHeight, clipWidth, clipPathComponent | ||
} = props; | ||
return React.cloneElement( | ||
clipPathComponent, | ||
{ padding, clipId, translateX, translateY, clipWidth, clipHeight } | ||
{ padding, clipPadding, clipId, translateX, translateY, clipWidth, clipHeight } | ||
); | ||
@@ -84,0 +92,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
1292209
25642