Skip to content

Commit

Permalink
🐛 Refresh webcam onload
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul de Vries committed Dec 30, 2016
1 parent 812bc02 commit 58aab12
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions source/js/knockout/isLoading.js
Expand Up @@ -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);
Expand Down

0 comments on commit 58aab12

Please sign in to comment.