From 13af4beb9f5af4c1775ca26a81ebbdf59fe29e4f Mon Sep 17 00:00:00 2001 From: betateilchen Date: Wed, 4 Feb 2015 19:43:50 +0000 Subject: [PATCH] contrib/InfoPanel: updated git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@7871 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/contrib/InfoPanel/55_InfoPanel.pm | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/fhem/contrib/InfoPanel/55_InfoPanel.pm b/fhem/contrib/InfoPanel/55_InfoPanel.pm index 682e25201..17958249d 100644 --- a/fhem/contrib/InfoPanel/55_InfoPanel.pm +++ b/fhem/contrib/InfoPanel/55_InfoPanel.pm @@ -324,6 +324,18 @@ sub btIP_itemImg { return $output; } +# # 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"; + sub _btIP_imgData { my ($arg,$scale) = @_; my $info = image_info(\$arg); @@ -372,10 +384,10 @@ sub btIP_itemPlot { } } - my ($haswidth,$hasheight) = split(",", AttrVal($plotName[0],"plotsize","0,0")); +# my ($hasPlotsize) = split(",", AttrVal($plotName[0],"plotsize",0)); ($width,$height) = split(",", AttrVal($plotName[0],"plotsize","800,160")); ($newWidth,$newHeight) = _btIP_imgRescale($width,$height,$scale); - $attr{$plotName[0]}{plotsize} = "$newWidth,$newHeight"; +# $attr{$plotName[0]}{plotsize} = "$newWidth,$newHeight"; $FW_RET = undef; $FW_webArgs{dev} = $plotName[0]; @@ -384,10 +396,11 @@ sub btIP_itemPlot { $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_plotsize = "$newWidth,$newHeight"; ($mimetype, $svgdata) = SVG_showLog("unused"); - $attr{$plotName[0]}{plotsize} = undef; - $attr{$plotName[0]}{plotsize} = "$width,$height" if($haswidth || $hasheight); +# $attr{$plotName[0]}{plotsize} = undef; +# $attr{$plotName[0]}{plotsize} = "$width,$height" if $hasPlotsize; $svgdata =~ s/<\/svg>/<\/svg>/; (undef,undef,undef,$svgdata) = _btIP_imgData($svgdata,1);