2020.1

Table Of Contents
How to use the COTG plugin is explained in the following topic: "Using the COTG plugin: cotg-
2.0.0.js" on page579.
To learn how to create widgets in code, see "Dynamically adding COTG widgets" on page582
and "Saving and restoring custom data and widgets" on page585.
For a list of all COTG elements and their intended use, see "COTG Elements" on page681.
Barcode Scanner
cotgBarcode()
Initializing a Barcode Scanner element prepares it for user interaction.
Example: $('myScanner').cotgBarcode();
Events
The Barcode Scanner listens for the following events.
Event Description
clear.cotg Removes the scanned Barcode data.
scan.cotg Opens the scanner.
The Barcode Scanner broadcasts the following events.
Event Description
set.cotg This event is fired after Barcode data has been set to the value of the input.
Camera
cotgPhotoWidget([options])
options
Optional. An array containing the desired settings, e.g. {quality: 50, height: 1024, width: 1024}.
For any unspecified options the default settings will be used.
Page 593