mg-library 1.0.414 → 1.0.416
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 +6 -12
- package/package.json +1 -1
package/blocks.js
CHANGED
@@ -251,31 +251,25 @@ export function MGCurrentAccount(props) {
|
|
251
251
|
)
|
252
252
|
}
|
253
253
|
|
254
|
-
|
254
|
+
function getWidthForCamera() {
|
255
255
|
return Dimensions.get('window').width;
|
256
256
|
}
|
257
257
|
|
258
|
-
|
258
|
+
function getHeightForCamera() {
|
259
259
|
return Dimensions.get('window').height;
|
260
260
|
}
|
261
261
|
|
262
262
|
export function MGCamera(props) {
|
263
263
|
let camera;
|
264
|
-
|
265
|
-
let
|
266
|
-
let captureHeight = 275;
|
267
|
-
|
264
|
+
let captureWidth = 0;
|
265
|
+
let captureHeight = 0;
|
268
266
|
try {
|
269
267
|
captureWidth = Math.floor(getWidthForCamera() * 0.47);
|
270
268
|
captureHeight = Math.floor(getHeightForCamera() * 0.31);
|
271
269
|
} catch (error) {
|
272
|
-
|
273
|
-
|
270
|
+
captureWidth = 205;
|
271
|
+
captureHeight = 275;
|
274
272
|
}
|
275
|
-
|
276
|
-
console.log(captureWidth);
|
277
|
-
console.log(captureHeight);
|
278
|
-
|
279
273
|
const __takePicture = async () => {
|
280
274
|
if (!camera)
|
281
275
|
return;
|