scandit-capacitor-datacapture-barcode 6.28.6 → 6.28.8
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/ScanditCapacitorDatacaptureBarcode.podspec +1 -1
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/ScanditBarcodeNative.kt +13 -0
- package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/find/BarcodeFindViewHandler.kt +2 -2
- package/dist/barcode.js +6 -0
- package/dist/barcode.js.map +1 -1
- package/dist/dts/definitions.d.ts +1 -0
- package/dist/dts/ts/BarcodeFindView.d.ts +1 -0
- package/dist/dts/ts/Capacitor/BarcodeFindViewProxy.d.ts +1 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/ios/Plugin/ScanditBarcodeCapture.swift +25 -1
- package/package.json +4 -4
package/android/build.gradle
CHANGED
package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/ScanditBarcodeNative.kt
CHANGED
|
@@ -991,6 +991,19 @@ class ScanditBarcodeNative :
|
|
|
991
991
|
call.resolve()
|
|
992
992
|
}
|
|
993
993
|
|
|
994
|
+
@PluginMethod
|
|
995
|
+
fun setFindViewPositionAndSize(call: PluginCall) {
|
|
996
|
+
try {
|
|
997
|
+
val positionJson = call.data.getString("position")
|
|
998
|
+
?: return call.reject("No position was given for setting the view.")
|
|
999
|
+
val info = JSONObject(positionJson)
|
|
1000
|
+
barcodeFindViewHandler.setResizeAndMoveInfo(ResizeAndMoveInfo(info))
|
|
1001
|
+
call.resolve()
|
|
1002
|
+
} catch (e: JSONException) {
|
|
1003
|
+
call.reject(JsonParseError(e.message).toString())
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
|
|
994
1007
|
@PluginMethod
|
|
995
1008
|
fun setBarcodeFindModeEnabledState(call: PluginCall) {
|
|
996
1009
|
barcodeFindModule.setModeEnabled(call.data.getBoolean("enabled"))
|
|
@@ -128,8 +128,8 @@ class BarcodeFindViewHandler(
|
|
|
128
128
|
barcodeFindViewContainer.x = latestInfo.left.pxFromDp()
|
|
129
129
|
barcodeFindViewContainer.y = latestInfo.top.pxFromDp()
|
|
130
130
|
barcodeFindViewContainer.layoutParams.apply {
|
|
131
|
-
width =
|
|
132
|
-
height =
|
|
131
|
+
width = latestInfo.width.pxFromDp().toInt()
|
|
132
|
+
height = latestInfo.height.pxFromDp().toInt()
|
|
133
133
|
}
|
|
134
134
|
if (latestInfo.shouldBeUnderWebView) {
|
|
135
135
|
webView?.bringToFront()
|
package/dist/barcode.js
CHANGED
|
@@ -5987,6 +5987,9 @@ class BarcodeFindViewController extends BaseController {
|
|
|
5987
5987
|
hideView() {
|
|
5988
5988
|
return this._proxy.hideView();
|
|
5989
5989
|
}
|
|
5990
|
+
setPositionAndSize(top, left, width, height, shouldBeUnderWebView) {
|
|
5991
|
+
return this._proxy.setPositionAndSize(top, left, width, height, shouldBeUnderWebView);
|
|
5992
|
+
}
|
|
5990
5993
|
create() {
|
|
5991
5994
|
const barcodePickView = this.baseView.toJSON();
|
|
5992
5995
|
const json = JSON.stringify(barcodePickView);
|
|
@@ -6079,6 +6082,9 @@ class BaseBarcodeFindView {
|
|
|
6079
6082
|
hide() {
|
|
6080
6083
|
return this.controller.hideView();
|
|
6081
6084
|
}
|
|
6085
|
+
setPositionAndSize(top, left, width, height, shouldBeUnderWebView) {
|
|
6086
|
+
return this.controller.setPositionAndSize(top, left, width, height, shouldBeUnderWebView);
|
|
6087
|
+
}
|
|
6082
6088
|
get shouldShowUserGuidanceView() {
|
|
6083
6089
|
return BaseBarcodeFindView.barcodeFindViewDefaults.shouldShowUserGuidanceView;
|
|
6084
6090
|
}
|