react-image-gallery
Advanced tools
@@ -46,2 +46,3 @@ @charset "UTF-8"; | ||
| .image-gallery-slide { | ||
| filter: alpha(opacity=0); | ||
| opacity: 0; | ||
@@ -61,2 +62,3 @@ position: absolute; | ||
| .image-gallery-slide.center { | ||
| filter: alpha(opacity=100); | ||
| opacity: 1; | ||
@@ -101,2 +103,3 @@ position: relative; } | ||
| .image-gallery-thumbnails .image-gallery-thumbnails-container { | ||
| position: relative; | ||
| cursor: pointer; | ||
@@ -103,0 +106,0 @@ text-align: center; |
@@ -154,3 +154,3 @@ 'use strict'; | ||
| _handleResize: function _handleResize() { | ||
| this.setState({ containerWidth: this.getDOMNode().offsetWidth }); | ||
| this.setState({ containerWidth: this.refs.imageGallery.offsetWidth }); | ||
| }, | ||
@@ -160,3 +160,3 @@ | ||
| if (this.refs.thumbnails) { | ||
| var thumbNode = this.refs.thumbnails.getDOMNode(); | ||
| var thumbNode = this.refs.thumbnails; | ||
| if (thumbNode.scrollWidth <= this.state.containerWidth) { | ||
@@ -279,3 +279,3 @@ return 0; | ||
| 'section', | ||
| { className: 'image-gallery' }, | ||
| { ref: 'imageGallery', className: 'image-gallery' }, | ||
| _react2['default'].createElement( | ||
@@ -282,0 +282,0 @@ 'div', |
+8
-7
| 'use strict'; | ||
| import React from 'react/addons'; | ||
| import React from 'react'; | ||
| import ReactDOM from 'react-dom'; | ||
| import LinkedStateMixin from 'react-addons-linked-state-mixin'; | ||
| import ImageGallery from '../src/ImageGallery.react'; | ||
@@ -8,3 +11,3 @@ | ||
| mixins: [React.addons.LinkedStateMixin], | ||
| mixins: [LinkedStateMixin], | ||
@@ -122,5 +125,4 @@ getInitialState() { | ||
| type='checkbox' | ||
| checkedLink={this.linkState('showBullets')}> | ||
| checkedLink={this.linkState('showBullets')}/> | ||
| show bullets? | ||
| </input> | ||
| </li> | ||
@@ -130,5 +132,4 @@ <li> | ||
| type='checkbox' | ||
| checkedLink={this.linkState('showThumbnails')}> | ||
| checkedLink={this.linkState('showThumbnails')}/> | ||
| show Thumbnails? | ||
| </input> | ||
| </li> | ||
@@ -152,3 +153,3 @@ { | ||
| (function() { | ||
| React.render(<App/>, document.getElementById('container')); | ||
| ReactDOM.render(<App/>, document.getElementById('container')); | ||
| })(); |
@@ -11,4 +11,8 @@ <!DOCTYPE html> | ||
| <div id="container"></div> | ||
| <script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.1.13/es5-shim.min.js"></script> | ||
| <script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.1.13/es5-sham.min.js"></script> | ||
| <script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script> | ||
| <script src="https://raw.githubusercontent.com/paulmillr/console-polyfill/master/index.js"></script> | ||
| <script src="./example.js"></script> | ||
| </body> | ||
| </html> | ||
| </html> |
+5
-2
| { | ||
| "name": "react-image-gallery", | ||
| "version": "0.4.3", | ||
| "version": "0.4.4", | ||
| "description": "Image gallery component for React.JS", | ||
@@ -41,3 +41,6 @@ "main": "./build/image-gallery", | ||
| "gulp-uglify": "^1.2.0", | ||
| "react": "^0.12.2", | ||
| "install": "^0.1.8", | ||
| "react": "^0.14.0", | ||
| "react-addons-linked-state-mixin": "^0.14.0", | ||
| "react-dom": "^0.14.0", | ||
| "vinyl-source-stream": "^1.0.0", | ||
@@ -44,0 +47,0 @@ "watchify": "^2.4.0" |
@@ -149,3 +149,3 @@ 'use strict'; | ||
| _handleResize() { | ||
| this.setState({containerWidth: this.getDOMNode().offsetWidth}); | ||
| this.setState({containerWidth: this.refs.imageGallery.offsetWidth}); | ||
| }, | ||
@@ -155,3 +155,3 @@ | ||
| if (this.refs.thumbnails) { | ||
| let thumbNode = this.refs.thumbnails.getDOMNode(); | ||
| let thumbNode = this.refs.thumbnails; | ||
| if (thumbNode.scrollWidth <= this.state.containerWidth) { | ||
@@ -279,3 +279,3 @@ return 0; | ||
| return ( | ||
| <section className='image-gallery'> | ||
| <section ref='imageGallery' className='image-gallery'> | ||
| <div | ||
@@ -282,0 +282,0 @@ onMouseOver={this._handleMouseOver} |
@@ -71,2 +71,3 @@ $ig-screen-sm-min: 768px; | ||
| .image-gallery-slide { | ||
| filter: alpha(opacity=0); // ie8 | ||
| opacity: 0; | ||
@@ -88,2 +89,3 @@ position: absolute; | ||
| &.center { | ||
| filter: alpha(opacity=100); // ie8 | ||
| opacity: 1; | ||
@@ -139,2 +141,3 @@ position: relative; | ||
| .image-gallery-thumbnails-container { | ||
| position: relative; | ||
| cursor: pointer; | ||
@@ -141,0 +144,0 @@ text-align: center; |
36969
2.07%909
0.33%17
21.43%