Skip to content

Commit

Permalink
fix: Use the new #classicwebcam_container
Browse files Browse the repository at this point in the history
Since OctoPrint/OctoPrint#4628 we need to use `#classicwebcam_container` otherwise all controls and text information provided by this plugin is `display:none`.
  • Loading branch information
MikeRatcliffe authored May 29, 2023
1 parent 2f4dd12 commit b04e663
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions octoprint_fullscreen/static/js/fullscreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,18 @@ $(function() {
var $webcam = $('#webcam_image');
var $info = $('#fullscreen-bar');

var containerPlaceholder = document.getElementById('webcam') ? '#webcam' : '#webcam_container';
var containerPlaceholder = document.querySelector('#webcam,#webcam_container,#classicwebcam_container');
if (!containerPlaceholder) {
return;
}

var containerPlaceholderSelector = `#${containerPlaceholder.id}`;
if ($('.webcam_fixed_ratio').length > 0) {
$container = $(containerPlaceholder + ' .webcam_fixed_ratio');
$fullscreenContainer = $(containerPlaceholder + ' #webcam_rotator');
} else {
$container = $(containerPlaceholder + ' #webcam_rotator');
$fullscreenContainer = $(containerPlaceholder + ' #webcam_container');
$fullscreenContainer = $(containerPlaceholder + ' #classicwebcam_container');
}

var touchtime = 0;
Expand Down

0 comments on commit b04e663

Please sign in to comment.