react-gallery-layout
Advanced tools
+1
-1
| { | ||
| "name": "react-gallery-layout", | ||
| "version": "0.2.4", | ||
| "version": "0.2.5", | ||
| "description": "React.js based gallery component", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
+8
-6
@@ -12,8 +12,9 @@ import React from 'react' | ||
| measure () { | ||
| if (this.props.children.props.width && this.props.children.props.height) { | ||
| return { | ||
| width: this.props.children.props.width, | ||
| height: this.props.children.props.height | ||
| } | ||
| const childProps = this.props.children.props | ||
| if (childProps.width && childProps.height) { | ||
| return {width: childProps.width, height: childProps.height} | ||
| } | ||
| if (this.refs.item.measure) { | ||
| return this.refs.item.measure() | ||
| } | ||
| const node = ReactDOM.findDOMNode(this) | ||
@@ -52,3 +53,4 @@ return { | ||
| visible: !!this.props.rect, | ||
| rect: this.props.rect | ||
| rect: this.props.rect, | ||
| ref: 'item', | ||
| }) | ||
@@ -55,0 +57,0 @@ if (props.rect) { |
24230
0.26%534
0.38%