From 58aab128802f47b81d0ca4c792fa1d1a80546192 Mon Sep 17 00:00:00 2001 From: Paul de Vries Date: Fri, 30 Dec 2016 16:17:52 +0100 Subject: [PATCH] :bug: Refresh webcam onload --- source/js/knockout/isLoading.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/js/knockout/isLoading.js b/source/js/knockout/isLoading.js index e29f75e7..914f36f7 100644 --- a/source/js/knockout/isLoading.js +++ b/source/js/knockout/isLoading.js @@ -4,6 +4,12 @@ TouchUI.prototype.knockout.isLoading = function (viewModels) { if(self.isActive()) { self.components.touchscreen.isLoading.call(self, viewModels); + // Reload dimensions of webcam with onload event + // Fixes bug #78 + $("#webcam_image").on("load", function() { + viewModels.controlViewModel.updateRotatorWidth(); + }); + // Prevent user from double clicking in a short period on buttons $(document).on("click", "button:not(#login_button, .box, .distance, .dropdown-toggle)", function(e) { var printer = $(e.target);