diff --git a/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/BarcodeUtil.js b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/BarcodeUtil.js index 26d31f578aafd997937a417b33fae7fa844df4a3..8f27b9e273914d1e3ebb6dc6fe8e96fd8804e66f 100644 --- a/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/BarcodeUtil.js +++ b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/BarcodeUtil.js @@ -97,7 +97,7 @@ var BarcodeUtil = new function() { var $cameraContainer = $("<div>"); - $form.append($toggleSwitch); + $cameraContainer.append($toggleSwitch); $form.append($cameraContainer); var onDeviceChange = function() { @@ -151,9 +151,14 @@ var BarcodeUtil = new function() { this.enableAutomaticBarcodeReadingFromCamera = function(cameraDeviceId, $container, action) { _this.disableAutomaticBarcodeReadingFromCamera(); - var content = $container; - var $video = $("<video>", { id : "video", width : "50%", height : "50%", style : "display: block; margin: 0 auto;" }); - content.append($video); + var $video = $("<video>", { id : "video" }); + $video.css({ + display: "block", // centering + margin: "0 auto", // centering + width : "40%", + height : "40%" + }); + $container.append($video); // Starts the camera reading code const hints = new Map();