Gaëtan Renaudeau 7 anni fa
parent
commit
773f5d2d37

+ 6
- 0
android/react-native-view-shot.iml Vedi File

@@ -77,16 +77,22 @@
77 77
       <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
78 78
       <sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
79 79
       <sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
80
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotations" />
80 81
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
81 82
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
83
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
82 84
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
85
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-safeguard" />
86
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
83 87
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" />
84 88
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
85 89
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
86 90
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
87 91
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
88 92
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
93
+      <excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
89 94
       <excludeFolder url="file://$MODULE_DIR$/build/outputs" />
95
+      <excludeFolder url="file://$MODULE_DIR$/build/tmp" />
90 96
     </content>
91 97
     <orderEntry type="jdk" jdkName="Android API 26 Platform" jdkType="Android SDK" />
92 98
     <orderEntry type="sourceFolder" forTests="false" />

+ 6
- 3
example/App.js Vedi File

@@ -53,9 +53,12 @@ export default class App extends Component {
53 53
       snapshotContentContainer: false
54 54
     }
55 55
   };
56
-  
56
+
57 57
   snapshot = refname => () =>
58
-    (refname ? captureRef(this.refs[refname], this.state.value) : captureScreen(this.state.value))
58
+    (refname
59
+      ? captureRef(this.refs[refname], this.state.value)
60
+      : captureScreen(this.state.value)
61
+    )
59 62
       .then(
60 63
         res =>
61 64
           this.state.value.result !== "tmpfile"
@@ -149,7 +152,7 @@ export default class App extends Component {
149 152
             <Btn label="📷 MapView" onPress={this.snapshot("mapview")} />
150 153
             <Btn label="📷 WebView" onPress={this.snapshot("webview")} />
151 154
             <Btn label="📷 Video" onPress={this.snapshot("video")} />
152
-            <Btn label="📷 Native Screenshot" onPress={this.snapshot()}/>
155
+            <Btn label="📷 Native Screenshot" onPress={this.snapshot()} />
153 156
             <Btn
154 157
               label="📷 Empty View (should crash)"
155 158
               onPress={this.snapshot("empty")}

+ 10
- 0
example/ios/ViewShotExample.xcodeproj/project.pbxproj Vedi File

@@ -475,6 +475,15 @@
475 475
 			name = Products;
476 476
 			sourceTree = "<group>";
477 477
 		};
478
+		34FEAEFB1F779AA000EAD7B5 /* Recovered References */ = {
479
+			isa = PBXGroup;
480
+			children = (
481
+				79F086C5FD034CB6AFA5417A /* libRCTVideo.a */,
482
+				AD1B20B979EC412D9AD1D350 /* libRNSVG.a */,
483
+			);
484
+			name = "Recovered References";
485
+			sourceTree = "<group>";
486
+		};
478 487
 		5E91572E1DD0AC6500FF2AA8 /* Products */ = {
479 488
 			isa = PBXGroup;
480 489
 			children = (
@@ -531,6 +540,7 @@
531 540
 				13B07FAE1A68108700A75B9A /* ViewShotExample */,
532 541
 				832341AE1AAA6A7D00B99B32 /* Libraries */,
533 542
 				83CBBA001A601CBA00E9B192 /* Products */,
543
+				34FEAEFB1F779AA000EAD7B5 /* Recovered References */,
534 544
 			);
535 545
 			indentWidth = 2;
536 546
 			sourceTree = "<group>";

+ 1
- 1
example/package.json Vedi File

@@ -15,7 +15,7 @@
15 15
     "react-native": "^0.47.0",
16 16
     "react-native-maps": "^0.16.2",
17 17
     "react-native-svg": "^5.4.1",
18
-    "react-native-svg-uri": "^1.2.1",
18
+    "react-native-svg-uri": "github:gre/react-native-svg-uri#onLoad",
19 19
     "react-native-video": "^2.0.0",
20 20
     "react-native-view-shot": "file:..",
21 21
     "react-native-windows": "^0.47.0-rc.4"