@gyjshow/react-native-image-viewing 1.0.5 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -67,9 +67,6 @@ function ImageViewing({ images, keyExtractor, imageIndex, visible, onRequestClos
67
67
  const styles = StyleSheet.create({
68
68
  container: {
69
69
  flex: 1,
70
- width: SCREEN_WIDTH,
71
- justifyContent: "center",
72
- alignItems: "center",
73
70
  backgroundColor: "#000",
74
71
  },
75
72
  header: {
@@ -13,7 +13,7 @@ import { getImageStyles, getImageTransform } from "../../utils";
13
13
  import { ImageLoading } from "./ImageLoading";
14
14
  const SWIPE_CLOSE_OFFSET = 75;
15
15
  const SWIPE_CLOSE_VELOCITY = 1.55;
16
- const SCREEN = Dimensions.get("screen");
16
+ const SCREEN = Dimensions.get("window");
17
17
  const SCREEN_WIDTH = SCREEN.width;
18
18
  const SCREEN_HEIGHT = SCREEN.height;
19
19
  const ImageItem = ({ imageSrc, onZoom, onRequestClose, onLongPress, delayLongPress, swipeToCloseEnabled = true, doubleTapToZoomEnabled = true, }) => {
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import React from "react";
9
9
  import { ActivityIndicator, Dimensions, StyleSheet, View } from "react-native";
10
- const SCREEN = Dimensions.get("screen");
10
+ const SCREEN = Dimensions.get("window");
11
11
  const SCREEN_WIDTH = SCREEN.width;
12
12
  const SCREEN_HEIGHT = SCREEN.height;
13
13
  export const ImageLoading = () => (<View style={styles.loading}>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gyjshow/react-native-image-viewing",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "\"Enhanced image viewing component for React Native (Fork of react-native-image-viewing)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -18,7 +18,7 @@
18
18
  ],
19
19
  "scripts": {
20
20
  "build": "tsc",
21
- "postversion": "npm build"
21
+ "postversion": "npm run build"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "react": ">=18.0.0",