mg-library 1.0.405 → 1.0.406
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 +9 -3
- package/package.json +1 -1
package/blocks.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { useCallback, useState, useEffect } from 'react';
|
2
2
|
import { useForm, Controller } from 'react-hook-form';
|
3
|
-
import { View, ActivityIndicator, Pressable, Image, FlatList, Keyboard } from 'react-native';
|
3
|
+
import { View, ActivityIndicator, Pressable, Image, FlatList, Keyboard, Dimensions } from 'react-native';
|
4
4
|
import { Text, Divider, Button, Popover, Card, Layout, Input } from '@ui-kitten/components';
|
5
5
|
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
|
6
6
|
import * as ImageManipulator from 'expo-image-manipulator';
|
@@ -247,6 +247,12 @@ export function MGCurrentAccount(props) {
|
|
247
247
|
|
248
248
|
export function MGCamera(props) {
|
249
249
|
let camera;
|
250
|
+
|
251
|
+
//205
|
252
|
+
//275
|
253
|
+
let captureWidth = Dimensions.get('window').width * 0.60;
|
254
|
+
let captureHeight = Dimensions.get('window').height * 0.60;
|
255
|
+
|
250
256
|
const __takePicture = async () => {
|
251
257
|
if (!camera)
|
252
258
|
return;
|
@@ -254,7 +260,7 @@ export function MGCamera(props) {
|
|
254
260
|
props.dispatch(props.actions.startProcessing());
|
255
261
|
photo = await ImageManipulator.manipulateAsync(
|
256
262
|
photo.uri,
|
257
|
-
[{ resize: { width:
|
263
|
+
[{ resize: { width: captureWidth, height: captureHeight } }],
|
258
264
|
{ compress: 1, format: ImageManipulator.SaveFormat.JPEG }
|
259
265
|
);
|
260
266
|
photo = await ImageManipulator.manipulateAsync(
|
@@ -318,7 +324,7 @@ export function MGCamera(props) {
|
|
318
324
|
<Card header={cardHeader} footer={cardFooter}>
|
319
325
|
<View style={{ alignItems: 'center' }}>
|
320
326
|
<Camera
|
321
|
-
style={{ width:
|
327
|
+
style={{ width: captureWidth, height: captureHeight }}
|
322
328
|
type={type}
|
323
329
|
ref={(r) => {
|
324
330
|
camera = r
|