react-gear-chart
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -60,4 +60,9 @@ 'use strict'; | ||
var _shouldUpdate = require('should-update'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var shouldUpdateProps = ['id', 'startAngle', 'endAngle', 'innerRadius', 'outerRadius', 'margin', 'limit', 'clockwise', 'items', 'extra']; | ||
var Styles = { | ||
@@ -153,2 +158,7 @@ container: { | ||
}, { | ||
key: 'shouldComponentUpdate', | ||
value: function shouldComponentUpdate(nextProps) { | ||
return (0, _shouldUpdate.shouldUpdate)(shouldUpdateProps, this.props, nextProps); | ||
} | ||
}, { | ||
key: 'render', | ||
@@ -155,0 +165,0 @@ value: function render() { |
{ | ||
"name": "react-gear-chart", | ||
"description": "", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"author": "nooooru@gmail.com", | ||
@@ -93,3 +93,4 @@ "license": "MIT", | ||
"react-motion": "^0.5.0", | ||
"shortid": "^2.2.8" | ||
"shortid": "^2.2.8", | ||
"should-update": "^2.0.0" | ||
}, | ||
@@ -96,0 +97,0 @@ "peerDependencies": { |
@@ -8,2 +8,3 @@ // @flow | ||
import { AnnulusViewport, NormalizeAngleRange } from '../utils/math' | ||
import { shouldUpdate } from 'should-update' | ||
@@ -36,2 +37,5 @@ type Strip = { | ||
const shouldUpdateProps = ['id', 'startAngle', 'endAngle', 'innerRadius', 'outerRadius', | ||
'margin', 'limit', 'clockwise', 'items', 'extra'] | ||
const Styles = { | ||
@@ -120,2 +124,6 @@ container: { | ||
shouldComponentUpdate(nextProps) { | ||
return shouldUpdate(shouldUpdateProps, this.props, nextProps) | ||
} | ||
render() { | ||
@@ -122,0 +130,0 @@ let { id, innerRadius, outerRadius, items, margin, limit, startAngle, endAngle, |
@@ -30,3 +30,3 @@ /* @flow */ | ||
showExtra: true, | ||
items: null, | ||
items: GenerateTeethData(8), | ||
} | ||
@@ -43,3 +43,3 @@ | ||
if (prop === 'amount') { | ||
this.setState({ items: GenerateTeethData(value)}) | ||
this.setState({ items: GenerateTeethData(value), amount: value }) | ||
} else { | ||
@@ -124,3 +124,3 @@ this.setState({ [prop]: value }) | ||
clockwiseAnimate={clockwiseAnimate} | ||
items={items || GenerateTeethData(amount)} | ||
items={items} | ||
extra={showExtra && ExtraComponent} | ||
@@ -127,0 +127,0 @@ /> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
2663466
2301
7
+ Addedshould-update@^2.0.0
+ Addeddeep-property@1.1.0(transitive)
+ Addedshould-update@2.0.0(transitive)