mg-library 1.0.413 → 1.0.414

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.
Files changed (2) hide show
  1. package/blocks.js +11 -2
  2. package/package.json +1 -1
package/blocks.js CHANGED
@@ -261,11 +261,20 @@ 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
- console.log(getWidthForCamera());
268
- console.log(getHeightForCamera());
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);
269
278
 
270
279
  const __takePicture = async () => {
271
280
  if (!camera)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mg-library",
3
- "version": "1.0.413",
3
+ "version": "1.0.414",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {