You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// The path to your custom JSON template that defines the scanning process.
178
-
templateFilePath:'./DBR-PresetTemplates.json',
179
-
// engineResourcePaths typically is only assigned when using a framework like React/Angular/Vue where the resources are not in the same location as the script reference.
// The container for rendering the scanner and/or result view. Note that ResultView is only valid for SM_MULTI_UNIQUE mode. If not specified, a full-viewport default UI will be created.
187
-
container:"#camera-view-container",
188
-
scannerViewConfig: {
189
-
// The ResultViewConfig goes in here - see ResultViewConfig section
190
-
},
191
-
resultViewConfig: {
192
-
// The ResultViewConfig goes in here - see ResultViewConfig section
193
-
},
194
-
onUniqueBarcodeScanned: (result) => {
195
-
// Do something with the result
196
-
},
197
-
onInitPrepare: () => {
198
-
// Do something before the barcodeScanner initialized
199
-
},
200
-
onInitReady: (components) => {
201
-
// Do something with the foundational components
202
-
// Set the scan laser to be visible in cameraView
203
-
components.cameraView.setScanLaserVisible(true);
204
-
// Set the zoom factor to 3
205
-
components.cameraEnhancer.setZoom({
206
-
factor:3
207
-
});
208
-
// Set the scan region to a rectangle with percentage values by cameraEnhancer
209
-
let region = {
210
-
"x":0,
211
-
"y":20,
212
-
"width":100,
213
-
"height":60,
214
-
"isMeasuredInPercentage":true
215
-
};
216
-
components.cameraEnhancer.setScanRegion(region);
217
-
},
218
-
onCameraOpen: (components) => {
219
-
// Do something with the foundational components when the camera is successfully opened for the first time or after each camera switch
220
-
},
221
-
onCaptureStart: (components) => {
222
-
// Do something with the foundational components when the capture process begins
// The path to your custom JSON template that defines the scanning process.
177
+
templateFilePath:'./DBR-PresetTemplates.json',
178
+
// engineResourcePaths typically is only assigned when using a framework like React/Angular/Vue where the resources are not in the same location as the script reference.
// The container for rendering the scanner and/or result view. Note that ResultView is only valid for SM_MULTI_UNIQUE mode. If not specified, a full-viewport default UI will be created.
188
+
container:"#camera-view-container",
189
+
scannerViewConfig: {
190
+
// The ResultViewConfig goes in here - see ResultViewConfig section
191
+
},
192
+
resultViewConfig: {
193
+
// The ResultViewConfig goes in here - see ResultViewConfig section
194
+
},
195
+
onUniqueBarcodeScanned: (result) => {
196
+
// Do something with the result
197
+
},
198
+
onInitPrepare: () => {
199
+
// Do something before the barcodeScanner initialized
200
+
},
201
+
onInitReady: (components) => {
202
+
// Do something with the foundational components
203
+
// Set the scan laser to be visible in cameraView
204
+
components.cameraView.setScanLaserVisible(true);
205
+
// Set the zoom factor to 3
206
+
components.cameraEnhancer.setZoom({
207
+
factor:3
208
+
});
209
+
// Set the scan region to a rectangle with percentage values by cameraEnhancer
210
+
let region = {
211
+
"x":0,
212
+
"y":20,
213
+
"width":100,
214
+
"height":60,
215
+
"isMeasuredInPercentage":true
224
216
};
225
-
// Initialize the BarcodeScanner with the above BarcodeScannerConfig object
0 commit comments