diff --git a/octoprint_prusaslicerthumbnails/static/js/prusaslicerthumbnails.js b/octoprint_prusaslicerthumbnails/static/js/prusaslicerthumbnails.js index c047b4c..5b0bfff 100644 --- a/octoprint_prusaslicerthumbnails/static/js/prusaslicerthumbnails.js +++ b/octoprint_prusaslicerthumbnails/static/js/prusaslicerthumbnails.js @@ -18,7 +18,6 @@ $(function() { self.file_details = ko.observable(); self.crawling_files = ko.observable(false); self.crawl_results = ko.observableArray([]); - self.progress_bar_moved = false; self.filesViewModel.prusaslicerthumbnails_open_thumbnail = function(data) { if(data.thumbnail_src === "prusaslicerthumbnails"){ @@ -120,7 +119,9 @@ $(function() { }); self.settingsViewModel.settings.plugins.prusaslicerthumbnails.state_panel_thumbnail_scale_value.subscribe(function(newValue){ $('#prusaslicer_state_thumbnail').attr({'width': self.settingsViewModel.settings.plugins.prusaslicerthumbnails.state_panel_thumbnail_scale_value() + '%'}); - + if(self.settingsViewModel.settings.plugins.prusaslicerthumbnails.state_panel_thumbnail_scale_value() !== 100) { + $('#prusaslicer_state_thumbnail').addClass('pull-left').next('hr').remove(); + } }); // observe alignment changes @@ -157,11 +158,13 @@ $(function() { $('#prusaslicer_state_thumbnail').attr('src', file_data.thumbnail); } else { $('#state > div > hr:first').after(''); + if(self.settingsViewModel.settings.plugins.prusaslicerthumbnails.state_panel_thumbnail_scale_value() == 100) { + $('#prusaslicer_state_thumbnail').removeClass('pull-left').after('