Skip to content
Snippets Groups Projects
Verified Commit 5a48fb6f authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

fix: Improved code formatting for clarity in camera-capture component

- Cleaned up import statements for consistency.
- Reformatted code throughout the class for better readability and adherence to style guidelines.
- Added a fireCustomEvent call in `initEventHandler` to properly trigger the picture-taking event.
- Unified spacing and indentation across functions and methods for improved structure.
parent e35ae4b6
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,7 @@ import "../state/state.mjs";
import {getLocaleOfDocument} from "../../dom/locale.mjs";
import {addErrorAttribute} from "../../dom/error.mjs";
import {Queue} from "../../types/queue.mjs";
import {fireCustomEvent} from "../../dom/events.mjs";
export {CameraCapture};
......@@ -74,6 +75,7 @@ const emptyHistoryStateElementSymbol = Symbol("emptyHistoryStateElement");
* @since 3.111.0
* @copyright schukai GmbH
* @summary A simple but powerful camera capture component. It can be used to capture images from the camera.
* @fires monster-camera-capture-take-picture
*/
class CameraCapture extends CustomElement {
/**
......@@ -371,11 +373,16 @@ function getTranslations() {
/**
* @private
* @return {initEventHandler}
* @fires monster-camera-capture-take-picture
*/
function initEventHandler() {
const self = this;
this[takePictureButtonElementSymbol].setOption("actions.click", function () {
fireCustomEvent(self, "monster-camera-capture-take-picture", {
element: self,
});
self.capture();
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment