File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,7 @@ Updaterange('speed');
170
170
Updaterange('flow');
171
171
var pulse=true;
172
172
var initialization_done = false;
173
+ var pos=0;
173
174
function displaytemp(temperature, target,item,factor){
174
175
var displaypicture = " <svg height=\" 30px \" width=\" 300px \" xmlns=\" http://wwww.w3.org/2000/svg\" >\n <linearGradient id=\" gradient\" >\n " ;
175
176
var description = String (temperature) + " /" ;
@@ -178,8 +179,12 @@ else description += "Off ";
178
179
displaypicture+=" <stop class=\" begin\" style=\" stop-color:green;\" offset=\" 0%\" />\n " ;
179
180
displaypicture+=" <stop class=\" middle\" style=\" stop-color:yellow;\" offset=\" 100%\" />\n </linearGradient>\n <linearGradient id=\" gradient2\" >\n " ;
180
181
displaypicture+=" <stop class=\" middle\" style=\" stop-color:yellow;\" offset=\" 0%\" />\n <stop class=\" end\" style=\" stop-color:red;\" offset=\" 100%\" />\n " ;
181
- displaypicture+=" </linearGradient>\n <rect x=\" 10\" y=\" 4\" width=\" 24\" height=\" 21\" style=\" fill:url(#gradient)\" />\n " ;
182
- displaypicture+=" <rect x=\" 34\" y=\" 4\" width=\" 280\" height=\" 21\" style=\" fill:url(#gradient2)\" />\n <line x1=\" " ;
182
+ displaypicture+=" </linearGradient>\n <rect x=\" 10\" y=\" 4\" width=\" " ;
183
+ displaypicture+= String(Math.round( 24*factor ));
184
+ displaypicture+=" \" height=\" 21\" style=\" fill:url(#gradient)\" />\n " ;
185
+ displaypicture+=" <rect x=\" " ;
186
+ displaypicture+= String(10+Math.round( 24*factor ));
187
+ displaypicture+=" \" y=\" 4\" width=\" 280\" height=\" 21\" style=\" fill:url(#gradient2)\" />\n <line x1=\" " ;
183
188
displaypicture+=String(parseFloat(target)*factor+10);
184
189
displaypicture+=" \" y1=\" 4\" x2=\" " ;
185
190
displaypicture+=String(parseFloat(target)*factor+10);
You can’t perform that action at this time.
0 commit comments