Skip to content

Commit

Permalink
0.5.16 build files and version update
Browse files Browse the repository at this point in the history
  • Loading branch information
neptunian committed Jan 30, 2018
1 parent 0862100 commit 7f229b1
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 9 deletions.
6 changes: 6 additions & 0 deletions .github/HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# React-Images

### v0.5.16 / 2018-01-30
- add preloadImage call to componentDidMount PR #200 thanks to [ilker0] (https://github.com/(https://github.com/ilker0)
- Changes some docs to clarify that yarn is the preferred package manager for this project. Removes package-lock.json. PR #191 Thanks to [jorrit](https://github.com/(https://github.com/jorrit)
- Unmount the component tree before removing the portal node from DOM PR #180 thanks to [pleunv](https://github.com/(https://github.com/pleunv)
- Fix react warnings by updating react-scrolllock version [jorrit] (https://github.com/(https://github.com/jorrit))

### v0.5.15 / 2018-01-25
- spinner functionality pull request #187 thanks to [mkalygin] (https://github.com/(https://github.com/mkalygin)

Expand Down
12 changes: 9 additions & 3 deletions dist/react-images.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import ScrollLock from 'react-scrolllock';
import { BounceLoader } from 'react-spinners';
import { StyleSheet as StyleSheet$1, css as css$1 } from 'aphrodite/no-important';
import { CSSTransitionGroup } from 'react-transition-group';
import { render } from 'react-dom';
import { render, unmountComponentAtNode } from 'react-dom';

// ==============================
// THEME
Expand Down Expand Up @@ -900,6 +900,7 @@ var Portal = function (_Component) {
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
unmountComponentAtNode(this.portalElement);
document.body.removeChild(this.portalElement);
}
}, {
Expand Down Expand Up @@ -965,8 +966,13 @@ var Lightbox = function (_Component) {
}, {
key: 'componentDidMount',
value: function componentDidMount() {
if (this.props.isOpen && this.props.enableKeyboardInput) {
window.addEventListener('keydown', this.handleKeyboardInput);
if (this.props.isOpen) {
if (this.props.enableKeyboardInput) {
window.addEventListener('keydown', this.handleKeyboardInput);
}
if (this.props.currentImage) {
this.preloadImage(this.props.currentImage, this.handleImageLoaded);
}
}
}
}, {
Expand Down
10 changes: 8 additions & 2 deletions dist/react-images.js
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,7 @@ var Portal = function (_Component) {
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
reactDom.unmountComponentAtNode(this.portalElement);
document.body.removeChild(this.portalElement);
}
}, {
Expand Down Expand Up @@ -966,8 +967,13 @@ var Lightbox = function (_Component) {
}, {
key: 'componentDidMount',
value: function componentDidMount() {
if (this.props.isOpen && this.props.enableKeyboardInput) {
window.addEventListener('keydown', this.handleKeyboardInput);
if (this.props.isOpen) {
if (this.props.enableKeyboardInput) {
window.addEventListener('keydown', this.handleKeyboardInput);
}
if (this.props.currentImage) {
this.preloadImage(this.props.currentImage, this.handleImageLoaded);
}
}
}
}, {
Expand Down
2 changes: 1 addition & 1 deletion dist/react-images.min.js

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions lib/Lightbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,13 @@ var Lightbox = function (_Component) {
}, {
key: 'componentDidMount',
value: function componentDidMount() {
if (this.props.isOpen && this.props.enableKeyboardInput) {
window.addEventListener('keydown', this.handleKeyboardInput);
if (this.props.isOpen) {
if (this.props.enableKeyboardInput) {
window.addEventListener('keydown', this.handleKeyboardInput);
}
if (this.props.currentImage) {
this.preloadImage(this.props.currentImage, this.handleImageLoaded);
}
}
}
}, {
Expand Down
1 change: 1 addition & 0 deletions lib/components/Portal.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ var Portal = function (_Component) {
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
(0, _reactDom.unmountComponentAtNode)(this.portalElement);
document.body.removeChild(this.portalElement);
}
}, {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-images",
"version": "0.5.15",
"version": "0.5.16",
"description": "A simple, responsive lightbox component for displaying an array of images with React.js",
"main": "lib/Lightbox.js",
"jsnext:main": "dist/react-images.es.js",
Expand Down

0 comments on commit 7f229b1

Please sign in to comment.