react-image-gallery
Advanced tools
Comparing version 0.3.3 to 0.3.4
@@ -196,2 +196,40 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.ImageGallery = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | ||
var slides = []; | ||
var thumbnails = []; | ||
var bullets = []; | ||
this.props.items.map(function(item, index) { | ||
var alignment = this._getAlignment(index); | ||
slides.push( | ||
React.createElement("div", { | ||
key: index, | ||
className: 'ImageGallery_content_slides_slide ' + alignment}, | ||
React.createElement("img", {src: item.original}) | ||
) | ||
); | ||
if (this.props.showThumbnails) { | ||
thumbnails.push( | ||
React.createElement("a", { | ||
key: index, | ||
className: 'ImageGallery_thumbnail_container_thumbnails_thumbnail ' + (currentIndex === index ? 'active' : ''), | ||
onTouchStart: this.slideToIndex.bind(this, index), | ||
onClick: this.slideToIndex.bind(this, index)}, | ||
React.createElement("img", {src: item.thumbnail}) | ||
) | ||
); | ||
} | ||
if (this.props.showBullets) { | ||
bullets.push( | ||
React.createElement("li", { | ||
key: index, | ||
className: 'ImageGallery_bullet_container_bullets_bullet ' + (currentIndex === index ? 'active' : ''), | ||
onTouchStart: this.slideToIndex.bind(this, index), | ||
onClick: this.slideToIndex.bind(this, index)} | ||
) | ||
); | ||
} | ||
}.bind(this)); | ||
return ( | ||
@@ -214,14 +252,3 @@ React.createElement("section", {className: "ImageGallery"}, | ||
React.createElement("div", {className: "ImageGallery_content_slides"}, | ||
this.props.items.map(function(item, index) { | ||
var alignment = this._getAlignment(index); | ||
return ( | ||
React.createElement("div", { | ||
key: index, | ||
className: 'ImageGallery_content_slides_slide ' + alignment}, | ||
React.createElement("img", {src: item.original}) | ||
) | ||
); | ||
}, this) | ||
slides | ||
), | ||
@@ -233,14 +260,3 @@ | ||
React.createElement("ul", {className: "ImageGallery_bullet_container_bullets"}, | ||
this.props.items.map(function(item, index) { | ||
return ( | ||
React.createElement("li", { | ||
key: index, | ||
className: 'ImageGallery_bullet_container_bullets_bullet ' + (currentIndex === index ? 'active' : ''), | ||
onTouchStart: this.slideToIndex.bind(this, index), | ||
onClick: this.slideToIndex.bind(this, index)} | ||
) | ||
); | ||
}, this) | ||
bullets | ||
) | ||
@@ -258,15 +274,3 @@ ) | ||
style: ThumbnailStyle}, | ||
this.props.items.map(function(item, index) { | ||
return ( | ||
React.createElement("a", { | ||
key: index, | ||
className: 'ImageGallery_thumbnail_container_thumbnails_thumbnail ' + (currentIndex === index ? 'active' : ''), | ||
onTouchStart: this.slideToIndex.bind(this, index), | ||
onClick: this.slideToIndex.bind(this, index)}, | ||
React.createElement("img", {src: item.thumbnail}) | ||
) | ||
); | ||
}, this) | ||
thumbnails | ||
) | ||
@@ -273,0 +277,0 @@ ) |
{ | ||
"name": "react-image-gallery", | ||
"version": "0.3.3", | ||
"version": "0.3.4", | ||
"description": "Image gallery component for React.JS", | ||
@@ -5,0 +5,0 @@ "main": "./build/image-gallery", |
@@ -195,2 +195,40 @@ 'use strict'; | ||
var slides = []; | ||
var thumbnails = []; | ||
var bullets = []; | ||
this.props.items.map(function(item, index) { | ||
var alignment = this._getAlignment(index); | ||
slides.push( | ||
<div | ||
key={index} | ||
className={'ImageGallery_content_slides_slide ' + alignment}> | ||
<img src={item.original}/> | ||
</div> | ||
); | ||
if (this.props.showThumbnails) { | ||
thumbnails.push( | ||
<a | ||
key={index} | ||
className={'ImageGallery_thumbnail_container_thumbnails_thumbnail ' + (currentIndex === index ? 'active' : '')} | ||
onTouchStart={this.slideToIndex.bind(this, index)} | ||
onClick={this.slideToIndex.bind(this, index)}> | ||
<img src={item.thumbnail}/> | ||
</a> | ||
); | ||
} | ||
if (this.props.showBullets) { | ||
bullets.push( | ||
<li | ||
key={index} | ||
className={'ImageGallery_bullet_container_bullets_bullet ' + (currentIndex === index ? 'active' : '')} | ||
onTouchStart={this.slideToIndex.bind(this, index)} | ||
onClick={this.slideToIndex.bind(this, index)}> | ||
</li> | ||
); | ||
} | ||
}.bind(this)); | ||
return ( | ||
@@ -213,14 +251,3 @@ <section className='ImageGallery'> | ||
<div className='ImageGallery_content_slides'> | ||
{ | ||
this.props.items.map(function(item, index) { | ||
var alignment = this._getAlignment(index); | ||
return ( | ||
<div | ||
key={index} | ||
className={'ImageGallery_content_slides_slide ' + alignment}> | ||
<img src={item.original}/> | ||
</div> | ||
); | ||
}, this) | ||
} | ||
{slides} | ||
</div> | ||
@@ -232,14 +259,3 @@ | ||
<ul className='ImageGallery_bullet_container_bullets'> | ||
{ | ||
this.props.items.map(function(item, index) { | ||
return ( | ||
<li | ||
key={index} | ||
className={'ImageGallery_bullet_container_bullets_bullet ' + (currentIndex === index ? 'active' : '')} | ||
onTouchStart={this.slideToIndex.bind(this, index)} | ||
onClick={this.slideToIndex.bind(this, index)}> | ||
</li> | ||
); | ||
}, this) | ||
} | ||
{bullets} | ||
</ul> | ||
@@ -257,15 +273,3 @@ </div> | ||
style={ThumbnailStyle}> | ||
{ | ||
this.props.items.map(function(item, index) { | ||
return ( | ||
<a | ||
key={index} | ||
className={'ImageGallery_thumbnail_container_thumbnails_thumbnail ' + (currentIndex === index ? 'active' : '')} | ||
onTouchStart={this.slideToIndex.bind(this, index)} | ||
onClick={this.slideToIndex.bind(this, index)}> | ||
<img src={item.thumbnail}/> | ||
</a> | ||
); | ||
}, this) | ||
} | ||
{thumbnails} | ||
</div> | ||
@@ -272,0 +276,0 @@ </div> |
835
38696