Skip to content

Commit 4504504

Browse files
committed
Merge pull request #3668 from elquatro/master
Get rid of magic numbers in transitions example
2 parents be03fa7 + 0447f1e commit 4504504

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/transitions/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ <h4>Example Details</h4>
5454
var children = [];
5555
var pos = 0;
5656
var colors = ['red', 'gray', 'blue'];
57-
for (var i = this.state.current; i < this.state.current + 3; i++) {
57+
for (var i = this.state.current; i < this.state.current + colors.length; i++) {
5858
var style = {
5959
left: pos * 128,
60-
background: colors[i % 3]
60+
background: colors[i % colors.length]
6161
};
6262
pos++;
6363
children.push(<div key={i} className="animateItem" style={style}>{i}</div>);

0 commit comments

Comments
 (0)