From ebb2b6f740fa2e12df1f008cd1bfa5e5102c4ebb Mon Sep 17 00:00:00 2001 From: sgong-pdftron Date: Fri, 22 Mar 2024 08:44:41 -0700 Subject: [PATCH] Update sample dependency to point to the repo directly (#685) * update dependency * Updating package version * adds readme * Updating JS files --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- example/README.md | 6 ++++++ example/package.json | 2 +- lib/src/DocumentView/DocumentView.js | 2 +- package.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 example/README.md diff --git a/example/README.md b/example/README.md new file mode 100644 index 000000000..c104dba24 --- /dev/null +++ b/example/README.md @@ -0,0 +1,6 @@ +# Usage + +1. Install dependencies by running `yarn install`. This will also run `pod install` for iOS automatically. +2. Build and run the app by running: + - iOS: `yarn ios` + - Android: `yarn android` \ No newline at end of file diff --git a/example/package.json b/example/package.json index 5e80db45a..51f5db9f6 100644 --- a/example/package.json +++ b/example/package.json @@ -16,7 +16,7 @@ "deprecated-react-native-prop-types": "^2.3.0", "react": "^18.0.0", "react-native": "^0.69.1", - "react-native-pdftron": "file:../" + "react-native-pdftron": "github:PDFTron/pdftron-react-native" }, "devDependencies": { "@babel/core": "^7.12.9", diff --git a/lib/src/DocumentView/DocumentView.js b/lib/src/DocumentView/DocumentView.js index 15d3b14d1..8efa59c36 100644 --- a/lib/src/DocumentView/DocumentView.js +++ b/lib/src/DocumentView/DocumentView.js @@ -883,7 +883,7 @@ export class DocumentView extends PureComponent { setColorPostProcessMode = (colorPostProcessMode) => { const tag = findNodeHandle(this._viewerRef); if (tag != null) { - DocumentViewManager.setColorPostProcessMode(tag, colorPostProcessMode); + return DocumentViewManager.setColorPostProcessMode(tag, colorPostProcessMode); } return Promise.resolve(); }; diff --git a/package.json b/package.json index 214340fb2..24fa33c2d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "react-native-pdftron", "title": "React Native Pdftron", - "version": "3.0.4-2", + "version": "3.0.4-3", "description": "React Native Pdftron", "main": "./lib/index.js", "typings": "index.ts",