mg-library 1.0.413 → 1.0.415
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.
- package/blocks.js +12 -2
- package/package.json +1 -1
package/blocks.js
CHANGED
@@ -261,11 +261,21 @@ export function getHeightForCamera() {
|
|
261
261
|
|
262
262
|
export function MGCamera(props) {
|
263
263
|
let camera;
|
264
|
+
|
264
265
|
let captureWidth = 205;
|
265
266
|
let captureHeight = 275;
|
266
267
|
|
267
|
-
|
268
|
-
|
268
|
+
try {
|
269
|
+
captureWidth = Math.floor(getWidthForCamera() * 0.47);
|
270
|
+
captureHeight = Math.floor(getHeightForCamera() * 0.31);
|
271
|
+
} catch (error) {
|
272
|
+
let captureWidth = 205;
|
273
|
+
let captureHeight = 275;
|
274
|
+
}
|
275
|
+
|
276
|
+
console.log(captureWidth);
|
277
|
+
console.log(captureHeight);
|
278
|
+
console.log(Dimensions.get('window').scale);
|
269
279
|
|
270
280
|
const __takePicture = async () => {
|
271
281
|
if (!camera)
|