@capgo/camera-preview 6.5.8 → 6.5.10

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.
@@ -274,10 +274,10 @@ public class CameraActivity extends Fragment {
274
274
  switch (event.getAction()) {
275
275
  case MotionEvent.ACTION_DOWN:
276
276
  if (mLastTouchX == 0 || mLastTouchY == 0) {
277
- mLastTouchX = (int) event.getRawX() -
278
- layoutParams.leftMargin;
279
- mLastTouchY = (int) event.getRawY() -
280
- layoutParams.topMargin;
277
+ mLastTouchX =
278
+ (int) event.getRawX() - layoutParams.leftMargin;
279
+ mLastTouchY =
280
+ (int) event.getRawY() - layoutParams.topMargin;
281
281
  } else {
282
282
  mLastTouchX = (int) event.getRawX();
283
283
  mLastTouchY = (int) event.getRawY();
@@ -440,8 +440,8 @@ public class CameraActivity extends Fragment {
440
440
  frameContainerLayout.getWidth(),
441
441
  frameContainerLayout.getHeight()
442
442
  );
443
- camViewLayout.gravity = Gravity.CENTER_HORIZONTAL |
444
- Gravity.CENTER_VERTICAL;
443
+ camViewLayout.gravity =
444
+ Gravity.CENTER_HORIZONTAL | Gravity.CENTER_VERTICAL;
445
445
  frameCamContainerLayout.setLayoutParams(camViewLayout);
446
446
  }
447
447
  }
@@ -526,8 +526,8 @@ public class CameraActivity extends Fragment {
526
526
  "cameraCurrentlyLocked := " + Integer.toString(cameraCurrentlyLocked)
527
527
  );
528
528
  try {
529
- cameraCurrentlyLocked = (cameraCurrentlyLocked + 1) %
530
- getNumberOfCameras();
529
+ cameraCurrentlyLocked =
530
+ (cameraCurrentlyLocked + 1) % getNumberOfCameras();
531
531
  Log.d(TAG, "cameraCurrentlyLocked new: " + cameraCurrentlyLocked);
532
532
  } catch (Exception exception) {
533
533
  Log.d(TAG, Objects.requireNonNull(exception.getMessage()));
@@ -528,12 +528,13 @@ public class CameraPreview
528
528
  }
529
529
 
530
530
  if (height != 0) {
531
- computedHeight = (int) TypedValue.applyDimension(
532
- TypedValue.COMPLEX_UNIT_DIP,
533
- height,
534
- metrics
535
- ) -
536
- computedPaddingBottom;
531
+ computedHeight =
532
+ (int) TypedValue.applyDimension(
533
+ TypedValue.COMPLEX_UNIT_DIP,
534
+ height,
535
+ metrics
536
+ ) -
537
+ computedPaddingBottom;
537
538
  } else {
538
539
  Display defaultDisplay = getBridge()
539
540
  .getActivity()
@@ -542,12 +543,13 @@ public class CameraPreview
542
543
  final Point size = new Point();
543
544
  defaultDisplay.getSize(size);
544
545
 
545
- computedHeight = (int) TypedValue.applyDimension(
546
- TypedValue.COMPLEX_UNIT_PX,
547
- size.y,
548
- metrics
549
- ) -
550
- computedPaddingBottom;
546
+ computedHeight =
547
+ (int) TypedValue.applyDimension(
548
+ TypedValue.COMPLEX_UNIT_PX,
549
+ size.y,
550
+ metrics
551
+ ) -
552
+ computedPaddingBottom;
551
553
  }
552
554
 
553
555
  fragment.setRect(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/camera-preview",
3
- "version": "6.5.8",
3
+ "version": "6.5.10",
4
4
  "description": "Camera preview",
5
5
  "author": "Martin Donadieu <martindonadieu@gmail.com>",
6
6
  "license": "MIT",
@@ -44,22 +44,22 @@
44
44
  "@capacitor/android": "^6.0.0",
45
45
  "@capacitor/cli": "^6.0.0",
46
46
  "@capacitor/core": "^6.0.0",
47
- "@capacitor/docgen": "^0.2.2",
47
+ "@capacitor/docgen": "^0.3.0",
48
48
  "@capacitor/ios": "^6.0.0",
49
49
  "@ionic/eslint-config": "^0.4.0",
50
50
  "@ionic/prettier-config": "^4.0.0",
51
- "@ionic/swiftlint-config": "^1.1.2",
52
- "@types/node": "^20.12.12",
53
- "@typescript-eslint/eslint-plugin": "^7.11.0",
54
- "@typescript-eslint/parser": "^7.11.0",
51
+ "@ionic/swiftlint-config": "^2.0.0",
52
+ "@types/node": "^22.10.2",
53
+ "@typescript-eslint/eslint-plugin": "^8.18.0",
54
+ "@typescript-eslint/parser": "^8.18.0",
55
55
  "eslint": "^8.57.0",
56
56
  "eslint-plugin-import": "^2.29.1",
57
- "prettier": "^3.2.5",
58
- "prettier-plugin-java": "^2.6.0",
59
- "rimraf": "^5.0.7",
60
- "rollup": "^4.18.0",
61
- "swiftlint": "^1.0.2",
62
- "typescript": "^5.4.5"
57
+ "prettier": "^3.4.2",
58
+ "prettier-plugin-java": "^2.6.5",
59
+ "rimraf": "^6.0.1",
60
+ "rollup": "^4.28.1",
61
+ "swiftlint": "^2.0.0",
62
+ "typescript": "^5.7.2"
63
63
  },
64
64
  "peerDependencies": {
65
65
  "@capacitor/core": "^6.0.0"
@@ -78,6 +78,5 @@
78
78
  "android": {
79
79
  "src": "android"
80
80
  }
81
- },
82
- "packageManager": "pnpm@9.12.3+sha512.cce0f9de9c5a7c95bef944169cc5dfe8741abfb145078c0d508b868056848a87c81e626246cb60967cbd7fd29a6c062ef73ff840d96b3c86c40ac92cf4a813ee"
81
+ }
83
82
  }