@capgo/capacitor-document-scanner 8.2.0 → 8.3.0

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.
@@ -101,10 +101,13 @@ public class DocumentScannerPlugin extends Plugin {
101
101
  int quality = clamp(call.getInt("croppedImageQuality", 100), 0, 100);
102
102
  String responseType = normalizeResponseType(call.getString("responseType"));
103
103
  int pageLimit = clamp(call.getInt("maxNumDocuments", 24), 1, 24);
104
- boolean allowAdjustCrop = call.getBoolean("letUserAdjustCrop", true);
105
104
  float brightness = clampFloat(call.getFloat("brightness", 0f), -255f, 255f);
106
105
  float contrast = clampFloat(call.getFloat("contrast", 1f), 0f, 10f);
107
106
  String scannerMode = normalizeScannerMode(call.getString("scannerMode"));
107
+ // Only default letUserAdjustCrop to true if scannerMode is FULL
108
+ // This ensures scannerMode takes precedence when explicitly set
109
+ boolean defaultAllowCrop = SCANNER_MODE_FULL.equals(scannerMode);
110
+ boolean allowAdjustCrop = call.getBoolean("letUserAdjustCrop", defaultAllowCrop);
108
111
 
109
112
  GmsDocumentScannerOptions.Builder optionsBuilder = new GmsDocumentScannerOptions.Builder()
110
113
  .setGalleryImportAllowed(false)
@@ -3,7 +3,7 @@ import Foundation
3
3
 
4
4
  @objc(DocumentScannerPlugin)
5
5
  public class DocumentScannerPlugin: CAPPlugin, CAPBridgedPlugin {
6
- private let pluginVersion: String = "8.2.0"
6
+ private let pluginVersion: String = "8.3.0"
7
7
  public let identifier = "DocumentScannerPlugin"
8
8
  public let jsName = "DocumentScanner"
9
9
  public let pluginMethods: [CAPPluginMethod] = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-document-scanner",
3
- "version": "8.2.0",
3
+ "version": "8.3.0",
4
4
  "description": "Capacitor plugin to scan document iOS and Android",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",