react-responsive-carousel
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -34,3 +34,3 @@ /** @jsx React.DOM */ | ||
// Only components with a parent will be unmounted | ||
React.unmountComponentAtNode(componentInstance.getDOMNode().parent); | ||
React.unmountComponentAtNode(componentInstance.getDOMNode()); | ||
} | ||
@@ -37,0 +37,0 @@ }); |
@@ -32,10 +32,6 @@ /** @jsx React.DOM */ | ||
// Only components with a parent will be unmounted | ||
React.unmountComponentAtNode(componentInstance.getDOMNode().parent); | ||
React.unmountComponentAtNode(componentInstance.getDOMNode()); | ||
} | ||
}); | ||
it("should be an instance of component", function(){ | ||
expect(TestUtils.isCompositeComponent(componentInstance)).toBe(true); | ||
}); | ||
it("Should have a state currentImage", function () { | ||
@@ -42,0 +38,0 @@ expect(componentInstance.state.currentImage).toBeDefined(); |
@@ -217,16 +217,7 @@ /** @jsx React.DOM */ | ||
getTotalWidth:function () { | ||
if (this.isMounted()) { | ||
return this.lastElementPosition + outerWidth(this.lastElement.getDOMNode()); | ||
} else { | ||
return 'auto'; | ||
} | ||
return this.itemSize * this.props.items.length || 'auto'; | ||
}, | ||
getNextPosition:function () { | ||
if (this.isMounted()) { | ||
var nextPosition = this.refs['item' + this.state.firstItem].getDOMNode().offsetLeft; | ||
return - nextPosition; | ||
} else { | ||
return 0; | ||
} | ||
return - this.itemSize * this.state.firstItem || 0; | ||
}, | ||
@@ -278,3 +269,3 @@ | ||
} | ||
return React.createElement("p", {className: "carousel-status"}, this.state.selectedItem, " of ", this.props.items.length); | ||
return React.createElement("p", {className: "carousel-status"}, this.state.selectedItem + 1, " of ", this.props.items.length); | ||
}, | ||
@@ -281,0 +272,0 @@ |
@@ -1,7 +0,6 @@ | ||
var React = require('react/addons'); | ||
var classSet = React.addons.classSet; | ||
var classNames = require('classnames'); | ||
module.exports = { | ||
CAROUSEL:function (isSlider) { | ||
return classSet({ | ||
return classNames({ | ||
"carousel": true, | ||
@@ -13,3 +12,3 @@ "carousel-slider": isSlider | ||
WRAPPER:function (isSlider) { | ||
return classSet({ | ||
return classNames({ | ||
"thumbs-wrapper": !isSlider, | ||
@@ -21,3 +20,3 @@ "slider-wrapper": isSlider | ||
SLIDER:function (isSlider, isSwiping){ | ||
return classSet({ | ||
return classNames({ | ||
"thumbs": !isSlider, | ||
@@ -30,3 +29,3 @@ "slider": isSlider, | ||
ITEM:function (isSlider, index, selectedItem) { | ||
return classSet({ | ||
return classNames({ | ||
"thumb": !isSlider, | ||
@@ -39,3 +38,3 @@ "slide": isSlider, | ||
ARROW_LEFT:function (disabled) { | ||
return classSet({ | ||
return classNames({ | ||
"control-arrow control-left": true, | ||
@@ -47,3 +46,3 @@ "control-disabled": disabled | ||
ARROW_RIGHT:function (disabled) { | ||
return classSet({ | ||
return classNames({ | ||
"control-arrow control-right": true, | ||
@@ -55,3 +54,3 @@ "control-disabled": disabled | ||
DOT:function (selected) { | ||
return classSet({ | ||
return classNames({ | ||
"dot": true, | ||
@@ -58,0 +57,0 @@ 'selected': selected |
{ | ||
"name": "react-responsive-carousel", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "React Responsive Carousel", | ||
@@ -32,5 +32,4 @@ "author": { | ||
"dependencies": { | ||
"react": "~0.12.2", | ||
"react-addons": "^0.9.0" | ||
"react": "^0.13.3" | ||
} | ||
} |
# React Responsive Carousel (WIP) | ||
* Note: This version `0.1.1` was updated for use with React `0.13.3`. For React < `0.13.0` try the version `0.1.0`; | ||
@@ -4,0 +5,0 @@ ## Demo |
1
201
71924
1174
+ Addedreact@0.13.3(transitive)
- Removedreact-addons@^0.9.0
- Removedreact@0.12.2(transitive)
- Removedreact-addons@0.9.0(transitive)
Updatedreact@^0.13.3