Skip to content

Commit

Permalink
Merge pull request #61 from z372183629/master
Browse files Browse the repository at this point in the history
Update AlbumSheet.js, #60
  • Loading branch information
rilyu authored Sep 14, 2017
2 parents 1fd939f + c6010cf commit ea1f398
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/AlbumView/AlbumSheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ export default class AlbumSheet extends TransformView {
}

getElementSize(element) {
let width = 0, htight = 0;
if (React.isValidElement(props.image)) {
let style = StyleSheet.flatten(props.image.props.style);
let width = 0, height = 0;
if (React.isValidElement(element)) {
let style = StyleSheet.flatten(element.props.style);
if (style.width === null || style.width === undefined
|| style.height === null || style.height === undefined) {
console.error('You need to specify the width and height style when the image is a element');
Expand All @@ -117,7 +117,7 @@ export default class AlbumSheet extends TransformView {
height = style.height;
}
}
return {width, htight};
return {width, height};
}

getFitSize(actualWidth, actualHeight, viewWidth, viewHeight) {
Expand Down

0 comments on commit ea1f398

Please sign in to comment.