new ReviewControl(containerId, options)
Shows review screen with the image input and toolbar with Accept & Retake buttons
Parameters:
Name |
Type |
Description |
containerId |
String
|
The ID of the DIV to display the review screen.
The div container must exist, or an error will be thrown.
Application developer has to properly set size & position of div.
SDK doesn't check size & position or any other container css properties, this is a developer responsibility.
The div container can be either empty or not. In case of not empty container the review control will hide all
nested child elements till Accept or Retake is pressed. |
options |
Object
|
By using these options we can customize the Review Control.
Properties
Name |
Type |
Description |
acceptButton |
Object
|
By using these options we can customize accept button.
Properties
Name |
Type |
Attributes |
Default |
Description |
text |
String
|
<optional>
|
"Accept"
|
By using this we can configure accept button text. |
|
retakeButton |
Object
|
By using these options we can customize retake button.
Properties
Name |
Type |
Attributes |
Default |
Description |
text |
String
|
<optional>
|
"Retake"
|
By using this we can configure retake button text. |
|
nextButton |
Object
|
By using these options we can customize next button.
Properties
Name |
Type |
Attributes |
Default |
Description |
text |
String
|
<optional>
|
"Next"
|
By using this we can configure next button text. |
|
|
Methods
(static) getDefaultOptions(successCallBack, errorCallBack)
Returns default Review Control options.
Parameters:
Name |
Type |
Description |
successCallBack |
function
|
callback with JSON object representing review control options |
errorCallBack |
function
|
callback with error message to be invoked when something goes wrong |
(static) ReviewControl#getOptions(successCallBack, errorCallBack)
Returns current Review Control options.
Parameters:
Name |
Type |
Description |
successCallBack |
function
|
callback with JSON object representing review control options |
errorCallBack |
function
|
callback with error message to be invoked when something goes wrong |
review(imageData, acceptCallBack, retakeCallBack)
Shows review screen with the image input and toolbar with Accept & Retake buttons
Parameters:
Name |
Type |
Description |
imageData |
ImageData
|
Image to be reviewed. This image is expected to have valid dimensions |
acceptCallBack |
function
|
Callback to be invoked when user press accept button |
retakeCallBack |
function
|
Callback to be invoked when user press retake button |