scandit-capacitor-datacapture-barcode 6.28.7 → 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.
@@ -17,5 +17,5 @@ Pod::Spec.new do |s|
17
17
 
18
18
  s.dependency "Capacitor"
19
19
  s.dependency "ScanditCapacitorDatacaptureCore", "= #{version}"
20
- s.dependency "scandit-datacapture-frameworks-barcode", '= 6.28.7'
20
+ s.dependency "scandit-datacapture-frameworks-barcode", '= 6.28.8'
21
21
  end
@@ -56,7 +56,7 @@ repositories {
56
56
  }
57
57
 
58
58
  dependencies {
59
- def sdk_version = "6.28.7"
59
+ def sdk_version = "6.28.8"
60
60
 
61
61
  implementation fileTree(dir: 'libs', include: ['*.jar'])
62
62
  implementation fileTree(dir: 'library', include: ['*.aar'])
@@ -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 = ViewGroup.LayoutParams.MATCH_PARENT
132
- height = ViewGroup.LayoutParams.MATCH_PARENT
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
  }