Skip to content

Commit

Permalink
Fixed graph settings not working: #6
Browse files Browse the repository at this point in the history
  • Loading branch information
LazeMSS committed Jan 25, 2021
1 parent 3effcf3 commit a182e4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions octoprint_toptemp/static/js/TopTemp.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ $(function() {
graphE.show();

// Update the styles if settings are open
if (self.settingsOpen){
if (self.settingsOpen && self.previewOn){
self.setGraphStyle(name,iSettings.graphSettings);
}

Expand Down Expand Up @@ -889,7 +889,7 @@ $(function() {
// Remove old
$('#TopTempGraph_'+name+'_style').remove();
// Build new
$('head').append('<style id="TopTempGraph_'+name+'_style">#TopTempGraph_'+name+'_graph{height:'+settings.height()+'%};#TopTempGraph_'+name+'_graph.TopTempGraph > svg >g .ct-line{stroke-width: '+settings.width()+'px; stroke-opacity: '+settings.opa()+'; stroke: '+settings.color()+';}</style>');
$('head').append('<style id="TopTempGraph_'+name+'_style">\n#TopTempGraph_'+name+'_graph{\nheight:'+settings.height()+'%\n}\n#TopTempGraph_'+name+'_graph.TopTempGraph > svg >g .ct-line{\nstroke-width: '+settings.width()+'px;\nstroke-opacity: '+settings.opa()+';\nstroke: '+settings.color()+';\n}\n</style>' );
// Show the graph?
if (settings.show){
$('#TopTempGraph_'+name+'_graph').show();
Expand Down

0 comments on commit a182e4b

Please sign in to comment.