-
Bug
-
Resolution: Fixed
-
Normal
-
9.0.0, 8.6.4
-
Security Level: Jimmy
-
None
-
ZK 9.0.1 S1
-
None
Steps to Reproduce
Try the quagga integration e.g. with an ean13 barcode:
<barcodescanner type=" ean" continuous="true" interval="500" width="40px" height="30px" onDetect='output.text = output.text + "\n" + event.getType() + " " + event.getResult();'/>
compare vs larger component size
<barcodescanner type=" ean" continuous="true" interval="500" width="400px" height="300px" onDetect='output.text = output.text + "\n" + event.getType() + " " + event.getResult();'/>
Current Result
scanning using a smaller preview area is impossible, while it works better using larger component dimensions
Expected Result
scan quality should be independent of the preview area size, and rely on the video stream quality
Debug Information
the qr code reader integration doesn't have this problem
Workaround
disable the function via script override, and size the canvas via CSS (LIMIT: works as long as the the video resolution is smaller than the component dimensions)
zk.afterLoad('zkmax.barscanner', function() { var xBarcodescanner = {}; zk.override(zkmax.barscanner.Barcodescanner, xBarcodescanner, { _quaggaCanvasDim : function() { return {width: undefined}; //returning nothing makes it better } });//zk.override });//zk.afterLoad
.z-barcodescanner-canvas { max-width: 100%; max-height: 100%; }