@artistry/react
Advanced tools
Comparing version 0.5.17 to 0.5.18
@@ -25,3 +25,8 @@ "use strict"; | ||
if (this.props.onChangeSize) { | ||
let newIndex = Math.floor(this.props.activeIndex * oldSlideSize / slideSize); | ||
let oldIndex = this.props.activeIndex; | ||
if (oldIndex < 0) { | ||
let length = React.Children.count(this.props.children); | ||
oldIndex = (oldIndex % length) + length; | ||
} | ||
let newIndex = Math.floor(oldIndex * oldSlideSize / slideSize); | ||
this.props.onChangeSize(newIndex, slideSize, oldSlideSize); | ||
@@ -28,0 +33,0 @@ } |
{ | ||
"name": "@artistry/react", | ||
"version": "0.5.17", | ||
"version": "0.5.18", | ||
"description": "A powerful component library for React", | ||
@@ -5,0 +5,0 @@ "repository": "https://www.github.com/sjohnsonaz/artistry-react.git", |
230024
5699