scandit-capacitor-datacapture-barcode 6.25.0 → 6.25.2
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
|
@@ -120,9 +120,17 @@ class BarcodeFindViewHandler {
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
if shouldBeUnderWebView {
|
|
123
|
+
#if swift(>=5.0)
|
|
123
124
|
barcodeFindView.superview?.sendSubviewToBack(barcodeFindView)
|
|
125
|
+
#else
|
|
126
|
+
barcodeFindView.superview?.sendSubview(toBack: barcodeFindView)
|
|
127
|
+
#endif
|
|
124
128
|
} else {
|
|
129
|
+
#if swift(>=5.0)
|
|
125
130
|
barcodeFindView.superview?.bringSubviewToFront(barcodeFindView)
|
|
131
|
+
#else
|
|
132
|
+
barcodeFindView.superview?.bringSubview(toFront: barcodeFindView)
|
|
133
|
+
#endif
|
|
126
134
|
}
|
|
127
135
|
}
|
|
128
136
|
}
|
|
@@ -27,24 +27,24 @@ class BarcodePickViewHandler {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
weak var barcodePickViewUIDelegate: BarcodePickViewUIDelegate?
|
|
30
|
-
|
|
30
|
+
|
|
31
31
|
private var top: NSLayoutConstraint?
|
|
32
32
|
private var left: NSLayoutConstraint?
|
|
33
33
|
private var width: NSLayoutConstraint?
|
|
34
34
|
private var height: NSLayoutConstraint?
|
|
35
|
-
|
|
35
|
+
|
|
36
36
|
private var position = CGPoint.zero
|
|
37
37
|
private var size = CGSize.zero
|
|
38
38
|
private var shouldBeUnderWebView = false
|
|
39
|
-
|
|
39
|
+
|
|
40
40
|
private var constraints: [NSLayoutConstraint] {
|
|
41
41
|
return [top, left, width, height].compactMap({ $0 })
|
|
42
42
|
}
|
|
43
|
-
|
|
43
|
+
|
|
44
44
|
init(relativeTo webView: WKWebView) {
|
|
45
45
|
self.webView = webView
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
|
|
48
48
|
/// Update the constraints that set the position and size of the barcode pick view,
|
|
49
49
|
/// based on a JSON passed in as the argument to a Capacitor command.
|
|
50
50
|
///
|
|
@@ -58,29 +58,29 @@ class BarcodePickViewHandler {
|
|
|
58
58
|
shouldBeUnderWebView = positionAndSizeJSON.shouldBeUnderWebView
|
|
59
59
|
update()
|
|
60
60
|
}
|
|
61
|
-
|
|
61
|
+
|
|
62
62
|
private func update() {
|
|
63
63
|
updateConstraints()
|
|
64
64
|
updatePosition()
|
|
65
65
|
}
|
|
66
|
-
|
|
66
|
+
|
|
67
67
|
private func resetConstraints() {
|
|
68
68
|
top = nil
|
|
69
69
|
left = nil
|
|
70
70
|
width = nil
|
|
71
71
|
height = nil
|
|
72
72
|
}
|
|
73
|
-
|
|
73
|
+
|
|
74
74
|
private func activate() {
|
|
75
75
|
NSLayoutConstraint.activate(constraints)
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
private func updateConstraints() {
|
|
79
79
|
guard let barcodePickView = barcodePickView else { return }
|
|
80
|
-
|
|
80
|
+
|
|
81
81
|
let topConstant = position.y + webView.adjustedContentInset.top
|
|
82
82
|
let leftConstant = position.x + webView.adjustedContentInset.left
|
|
83
|
-
|
|
83
|
+
|
|
84
84
|
if let top = top {
|
|
85
85
|
top.constant = topConstant
|
|
86
86
|
} else {
|
|
@@ -112,16 +112,24 @@ class BarcodePickViewHandler {
|
|
|
112
112
|
barcodePickView.superview?.layoutIfNeeded()
|
|
113
113
|
|
|
114
114
|
}
|
|
115
|
-
|
|
115
|
+
|
|
116
116
|
private func updatePosition() {
|
|
117
117
|
guard let barcodePickView = barcodePickView else {
|
|
118
118
|
return
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
if shouldBeUnderWebView {
|
|
122
|
+
#if swift(>=5.0)
|
|
122
123
|
barcodePickView.superview?.sendSubviewToBack(barcodePickView)
|
|
124
|
+
#else
|
|
125
|
+
barcodePickView.superview?.sendSubview(toBack: barcodePickView)
|
|
126
|
+
#endif
|
|
123
127
|
} else {
|
|
128
|
+
#if swift(>=5.0)
|
|
124
129
|
barcodePickView.superview?.bringSubviewToFront(barcodePickView)
|
|
130
|
+
#else
|
|
131
|
+
barcodePickView.superview?.bringSubview(toFront: barcodePickView)
|
|
132
|
+
#endif
|
|
125
133
|
}
|
|
126
134
|
}
|
|
127
135
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scandit-capacitor-datacapture-barcode",
|
|
3
|
-
"version": "6.25.
|
|
3
|
+
"version": "6.25.2",
|
|
4
4
|
"description": "Scandit Data Capture SDK for Capacitor",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"private": false,
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"watch": "tsc --watch"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"scandit-capacitor-datacapture-core": "6.25.
|
|
27
|
-
"scandit-datacapture-frameworks-barcode": "6.25.
|
|
28
|
-
"scandit-datacapture-frameworks-core": "6.25.
|
|
26
|
+
"scandit-capacitor-datacapture-core": "6.25.2",
|
|
27
|
+
"scandit-datacapture-frameworks-barcode": "6.25.2",
|
|
28
|
+
"scandit-datacapture-frameworks-core": "6.25.2"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|