Skip to content

Commit

Permalink
remove additional hr added if state panel image is 100%
Browse files Browse the repository at this point in the history
  • Loading branch information
jneilliii committed Jan 25, 2024
1 parent 92449a9 commit f9cd434
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ $(function() {
} else {
$('#state > div > hr:first').after('<img id="prusaslicer_state_thumbnail" class="pull-left" src="'+file_data.thumbnail+'" 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').removeClass('pull-left').after('<hr>');
$('#prusaslicer_state_thumbnail').removeClass('pull-left').after('<hr id="prusaslicer_state_hr">');
}
if(self.settingsViewModel.settings.plugins.prusaslicerthumbnails.relocate_progress()) {
$('#state > div > div.progress.progress-text-centered').css({'margin-bottom': 'inherit'}).insertBefore('#prusaslicer_state_thumbnail').after('<hr>');
Expand All @@ -177,6 +177,9 @@ $(function() {
});
} else {
$('#prusaslicer_state_thumbnail').remove();
if(self.settingsViewModel.settings.plugins.prusaslicerthumbnails.state_panel_thumbnail_scale_value() == 100) {
$('#prusaslicer_state_hr').remove();
}
}
});
};
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
plugin_name = "Slicer Thumbnails"

# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
plugin_version = "1.0.5"
plugin_version = "1.0.6"

# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
# module
Expand Down

0 comments on commit f9cd434

Please sign in to comment.