Mobile Document Scanner API Reference / CaptureLayout
Interface: CaptureLayout
Defined in: src/settings/settings.ts:230
New content for the areas of the capture screen. Each area takes a template. Each time the document scanner builds the screen, it copies the template into the area, in place of the built-in content. The area element stays, and the styles of the document scanner still apply to it. An empty template leaves the area empty. false removes the header or the footer, with its buttons.
The document scanner does not copy the listeners of the template. Thus the host application listens for its own buttons on ScannerSettings.container. The published file dist/defaults/capture-layout.xml holds the built-in template of each area, to copy and change.
Properties
footer?
optionalfooter?:false|HTMLTemplateElement
Defined in: src/settings/settings.ts:244
The bar below the viewfinder. It holds the import button, the shutter, and the thumbnail.
header?
optionalheader?:false|HTMLTemplateElement
Defined in: src/settings/settings.ts:237
The bar above the viewfinder. It holds the cancel button, the auto-capture toggle, the torch button, and the camera switcher. It also holds the camera menu, which is one element with the mds-camera-menu class. Without the menu, the camera switcher selects the next camera.
viewfinder?
optionalviewfinder?:HTMLTemplateElement
Defined in: src/settings/settings.ts:239
The area that shows the video of the camera. The host application cannot remove it.