From c6010cf02c4dfb11be719f8d21676b10636411ca Mon Sep 17 00:00:00 2001 From: jialing Lee Date: Wed, 13 Sep 2017 19:59:49 +0800 Subject: [PATCH] Update AlbumSheet.js fix some bug --- components/AlbumView/AlbumSheet.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/AlbumView/AlbumSheet.js b/components/AlbumView/AlbumSheet.js index c97359e..260a7ae 100644 --- a/components/AlbumView/AlbumSheet.js +++ b/components/AlbumView/AlbumSheet.js @@ -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'); @@ -117,7 +117,7 @@ export default class AlbumSheet extends TransformView { height = style.height; } } - return {width, htight}; + return {width, height}; } getFitSize(actualWidth, actualHeight, viewWidth, viewHeight) {