diff --git a/fhem/contrib/InfoPanel/55_InfoPanel.pm b/fhem/contrib/InfoPanel/55_InfoPanel.pm
index bb6b94f08..79691a88c 100644
--- a/fhem/contrib/InfoPanel/55_InfoPanel.pm
+++ b/fhem/contrib/InfoPanel/55_InfoPanel.pm
@@ -305,7 +305,7 @@ sub btIP_itemImg {
}
($width,$height,$mimetype,$data) = _btIP_imgData($data,$scale);
- $output = "\n";
+ $output = "\n";
$output .= "\n";
return $output;
}
@@ -337,15 +337,6 @@ sub _btIP_imgRescale {
return ($width,$height);
}
-sub _btIP_svgRescale {
- my ($width,$height,$scale) = @_;
- if ($scale =~ s/([whWH])([\d]*)/$2/) {
- $scale = (uc($1) eq "W") ? $scale/$width : $scale/$height;
- }
- return $scale;
-}
-
-
sub btIP_itemLine {
my ($id,$x1,$y1,$x2,$y2,$th,%params)= @_;
$id = ($id eq '-') ? createUniqueId() : $id;
@@ -357,7 +348,7 @@ sub btIP_itemPlot {
my ($id,$x,$y,$scale,$inline,$arg) = @_;
my (@plotName) = split(";",$arg);
$id = ($id eq '-') ? createUniqueId() : $id;
- my (@webs,$width,$height,$output,$mimetype,$svgdata);
+ my (@webs,$width,$height,$newWidth,$newHeight,$output,$mimetype,$svgdata);
@webs=devspec2array("TYPE=FHEMWEB");
foreach(@webs) {
@@ -368,48 +359,26 @@ sub btIP_itemPlot {
}
($width,$height) = split(",", AttrVal($plotName[0],"plotsize","800,160"));
- ($width,$height) = _btIP_imgRescale($width,$height,$scale) unless $scale eq '1';
+ ($newWidth,$newHeight) = _btIP_imgRescale($width,$height,$scale);
+ $attr{$plotName[0]}{plotsize} = "$newWidth,$newHeight";
- if($inline eq "1") {
-#
-# embed base64 data
-#
- $FW_RET = undef;
- $FW_webArgs{dev} = $plotName[0];
- $FW_webArgs{logdev} = InternalVal($plotName[0], "LOGDEVICE", "");
- $FW_webArgs{gplotfile} = InternalVal($plotName[0], "GPLOTFILE", "");
- $FW_webArgs{logfile} = InternalVal($plotName[0], "LOGFILE", "CURRENT");
- $FW_pos{zoom} = ($plotName[1]) ? $plotName[1] : 'day';
- $FW_pos{off} = ($plotName[2]) ? $plotName[2] : undef;
+ $FW_RET = undef;
+ $FW_webArgs{dev} = $plotName[0];
+ $FW_webArgs{logdev} = InternalVal($plotName[0], "LOGDEVICE", "");
+ $FW_webArgs{gplotfile} = InternalVal($plotName[0], "GPLOTFILE", "");
+ $FW_webArgs{logfile} = InternalVal($plotName[0], "LOGFILE", "CURRENT");
+ $FW_pos{zoom} = ($plotName[1]) ? $plotName[1] : 'day';
+ $FW_pos{off} = ($plotName[2]) ? $plotName[2] : undef;
- ($mimetype, $svgdata) = SVG_showLog("unused");
- $svgdata =~ s/<\/svg>/<\/svg>/;
+ ($mimetype, $svgdata) = SVG_showLog("unused");
+ $attr{$plotName[0]}{plotsize} = "$width,$height";
- ($width,$height,$mimetype,$svgdata) = _btIP_imgData($svgdata,1);
- $scale = _btIP_svgRescale($width,$height,$scale);
-
- $output = "\n";
-# $output .= "\n";
+ $svgdata =~ s/<\/svg>/<\/svg>/;
+ (undef,undef,undef,$svgdata) = _btIP_imgData($svgdata,1);
- $output .= "\n".
- "\n\n".
- "\n";
- } else {
-#
-# embed link to plot
-#
- my $url;
- $url = "$FW_ME/SVG_showLog?dev=". $plotName[0].
- "&logdev=". InternalVal($plotName[0], "LOGDEVICE", "").
- "&gplotfile=". InternalVal($plotName[0], "GPLOTFILE", "").
- "&logfile=". InternalVal($plotName[0], "LOGFILE", "CURRENT");
- $url .= "&pos=". ($plotName[1]) ? $plotName[1] : 'day';
- $url .= "&zoom=". ($plotName[2]) ? $plotName[2] : undef;
-
- $output = "\n";
- }
+ $output = "\n";
+ $output .= "\n";
return $output;
}