diff --git a/src/components/ImageView/index.js b/src/components/ImageView/index.js index d19b3f6ce05d..9779f3351266 100644 --- a/src/components/ImageView/index.js +++ b/src/components/ImageView/index.js @@ -14,12 +14,6 @@ class ImageView extends PureComponent { super(props); this.scrollableRef = null; this.canUseTouchScreen = canUseTouchScreen(); - this.containerStyles = [ - styles.w100, - styles.h100, - styles.alignItemsCenter, - styles.justifyContentCenter, - ]; this.state = { isZoomed: false, isDragging: false, @@ -68,7 +62,7 @@ class ImageView extends PureComponent { if (this.canUseTouchScreen) { return ( this.scrollableRef = el} style={[ - ...this.containerStyles, + styles.imageViewContainer, styles.overflowScroll, styles.noScrollbars, ]} diff --git a/src/styles/styles.js b/src/styles/styles.js index 9cbedf272b3b..358f1df31392 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -957,6 +957,13 @@ const styles = { width: '100%', }, + imageViewContainer: { + width: '100%', + height: '100%', + alignItems: 'center', + justifyContent: 'center', + }, + imageModalPDF: { flex: 1, backgroundColor: themeColors.modalBackground,