LazeMSS / OctoPrint-TopTemp

Topbar temperature plugin for OctoPrint
21 stars 2 forks source link

Line settings (width, color, and opacity) are not honored #6

Closed SureshotM6 closed 3 years ago

SureshotM6 commented 3 years ago

If you change the graph line setting, the lines still show as 1px width, black colored, and 40% opacity. Tested with Chrome 87.0.4280.141.

The default "#navbar_plugin_toptemp div.TopTempGraph .ct-line" CSS rule, defined in TopTemp.css is taking effect.

The javascript is generating dynamic CSS rules like this: #TopTempGraph_bed_graph{height:50%};#TopTempGraph_bed_graph.TopTempGraph > svg >g .ct-line{stroke-width: 2px; stroke-opacity: 0.2; stroke: #0000ff;}

The first semicolon and the closing curly brace are swapped, so the rule does not apply. Swapping these back like so fixes the issue: #TopTempGraph_bed_graph{height:50%;} #TopTempGraph_bed_graph.TopTempGraph > svg >g .ct-line{stroke-width: 2px; stroke-opacity: 0.2; stroke: #0000ff;}

Relevant line of js code here.

Thanks for the plugin!

LazeMSS commented 3 years ago

Thanks - did alot of panic fixed before release :)

LazeMSS commented 3 years ago

Should be fixed in https://github.com/LazeMSS/OctoPrint-TopTemp/releases/tag/0.0.0.2

Please reopen if not fixed/working.