Skip to content

Commit

Permalink
v0.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
benhowell committed Sep 15, 2017
1 parent a4347b3 commit a226707
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# react-grid-gallery

### v0.4.3 / 2017-09-15

* Fixed resize event not triggering on scroll bar presence change [PR 40](https://github.com/benhowell/react-grid-gallery/pull/40). Thanks [SimeonC](https://github.com/SimeonC).

* Updated acknowledgements.


### v0.4.2 / 2017-07-23

* Added optional `id` prop for the id attribute of the `<Gallery>` tag.
Expand Down
15 changes: 13 additions & 2 deletions lib/Gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ var Gallery = function (_Component) {
key: 'componentDidMount',
value: function componentDidMount() {
this.onResize();
window.addEventListener('resize', this.onResize);
}
}, {
key: 'componentWillReceiveProps',
Expand Down Expand Up @@ -288,12 +287,24 @@ var Gallery = function (_Component) {
thumbnailStyle: _this2.props.thumbnailStyle
});
});

var resizeIframeStyles = {
height: 0,
margin: 0,
padding: 0,
overflow: "hidden",
borderWidth: 0,
position: "fixed",
backgroundColor: "transparent",
width: "100%"
};
return _react2.default.createElement(
'div',
{ id: this.props.id, className: 'ReactGridGallery', ref: function ref(c) {
return _this2._gallery = c;
} },
_react2.default.createElement('iframe', { style: resizeIframeStyles, ref: function ref(c) {
return c && c.contentWindow.addEventListener('resize', _this2.onResize);
} }),
images,
_react2.default.createElement(_reactImages2.default, {
images: this.props.images,
Expand Down
6 changes: 3 additions & 3 deletions lib/react-grid-gallery.bundle.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-grid-gallery",
"version": "0.4.2",
"version": "0.4.3",
"description": "Justified gallery component for React.",
"main": "lib/Gallery.js",
"dependencies": {
Expand Down

0 comments on commit a226707

Please sign in to comment.