scandit-capacitor-datacapture-barcode 6.10.0 → 6.10.1
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/android/build.gradle
CHANGED
|
@@ -44,7 +44,7 @@ dependencies {
|
|
|
44
44
|
implementation project(':capacitor-android')
|
|
45
45
|
|
|
46
46
|
implementation project(':scandit-capacitor-datacapture-core')
|
|
47
|
-
api "com.scandit.datacapture:barcode:6.10.
|
|
47
|
+
api "com.scandit.datacapture:barcode:6.10.1"
|
|
48
48
|
|
|
49
49
|
implementation "androidx.core:core-ktx:1.6.0"
|
|
50
50
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
|
@@ -46,6 +46,8 @@ class ScanditBarcodeCapture: CAPPlugin, DataCapturePlugin {
|
|
|
46
46
|
var lastTrackedBarcodes: [NSNumber: TrackedBarcode]?
|
|
47
47
|
var lastFrameSequenceId: Int?
|
|
48
48
|
|
|
49
|
+
var offset: [Int: PointWithUnit] = [:]
|
|
50
|
+
|
|
49
51
|
override func load() {
|
|
50
52
|
ScanditCaptureCore.dataCapturePlugins.append(self as DataCapturePlugin)
|
|
51
53
|
}
|
|
@@ -214,10 +216,12 @@ class ScanditBarcodeCapture: CAPPlugin, DataCapturePlugin {
|
|
|
214
216
|
|
|
215
217
|
guard let offsetString = json.offset, let offset = PointWithUnit(JSONString: offsetString) else {
|
|
216
218
|
call.reject(CommandError.invalidJSON.toJSONString())
|
|
219
|
+
self.offset[trackedBarcode.identifier] = PointWithUnit.zero
|
|
217
220
|
return
|
|
218
221
|
}
|
|
219
222
|
|
|
220
223
|
self.barcodeTrackingAdvancedOverlay?.setOffset(offset, for: trackedBarcode)
|
|
224
|
+
self.offset[trackedBarcode.identifier] = offset
|
|
221
225
|
call.resolve()
|
|
222
226
|
}
|
|
223
227
|
|
|
@@ -317,11 +321,12 @@ class ScanditBarcodeCapture: CAPPlugin, DataCapturePlugin {
|
|
|
317
321
|
}
|
|
318
322
|
overlay.setAnchor(anchor, for: trackedBarcode)
|
|
319
323
|
case .offsetForTrackedBarcode:
|
|
320
|
-
guard let offset = callbackResult.offset else {
|
|
324
|
+
guard let offset = callbackResult.offset ?? self.offset[trackedBarcode.identifier] else {
|
|
321
325
|
/// The JS listener didn't return a valid offset,
|
|
322
326
|
/// e.g. it didn't implement the relevant listener function.
|
|
323
327
|
return
|
|
324
328
|
}
|
|
329
|
+
self.offset.removeValue(forKey: trackedBarcode.identifier)
|
|
325
330
|
overlay.setOffset(offset, for: trackedBarcode)
|
|
326
331
|
default:
|
|
327
332
|
return
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scandit-capacitor-datacapture-barcode",
|
|
3
|
-
"version": "6.10.
|
|
3
|
+
"version": "6.10.1",
|
|
4
4
|
"description": "Scandit Data Capture SDK for Capacitor",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"watch": "tsc --watch"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"scandit-capacitor-datacapture-core": "6.10.
|
|
23
|
+
"scandit-capacitor-datacapture-core": "6.10.1"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@capacitor/android": ">=2.0.0",
|
|
@@ -37,9 +37,6 @@
|
|
|
37
37
|
"typescript": "~3.8.3",
|
|
38
38
|
"tslint": "^5.16.0"
|
|
39
39
|
},
|
|
40
|
-
"peerDependencies": {
|
|
41
|
-
"@capacitor/core": "^2.0.0"
|
|
42
|
-
},
|
|
43
40
|
"files": [
|
|
44
41
|
"dist/",
|
|
45
42
|
"ios/",
|