From 6d99bd521f7b47226840c6a51c29cccedc3eaee5 Mon Sep 17 00:00:00 2001 From: Damian Date: Mon, 6 Oct 2025 13:27:55 +0000 Subject: [PATCH] 98_DOIF.pm uitable: svg: compatibility with chrome explorer restored git-svn-id: https://svn.fhem.de/fhem/trunk@30355 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_DOIF.pm | 49 ++++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/fhem/FHEM/98_DOIF.pm b/fhem/FHEM/98_DOIF.pm index 7182179c2..56dfe6f40 100644 --- a/fhem/FHEM/98_DOIF.pm +++ b/fhem/FHEM/98_DOIF.pm @@ -5800,6 +5800,7 @@ sub card $rotate=0 if (!defined $rotate); $iscale=1 if (!defined $iscale); $ic="" if (!defined($ic)); + $iscale/=2; } my $svg_width=int($size/100*$bwidth); @@ -5864,13 +5865,13 @@ $out.= sprintf ('%s',defined $ic ? 34:14,$header_style,$header_txt) if (defined $header); if (defined $icon and $icon ne "" and $icon ne " ") { my $svg_icon=::FW_makeImage($ic); - if (!($svg_icon =~ s/\sheight="[^"]*"/ height="18"/)) { - $svg_icon =~ s/svg/svg height="18"/ + if (!($svg_icon =~ s/\sheight="[^"]*"/ height="34"/)) { + $svg_icon =~ s/svg/svg height="34"/ } - if (!($svg_icon =~ s/\swidth="[^"]*"/ width="18"/)) { - $svg_icon =~ s/svg/svg width="18"/ + if (!($svg_icon =~ s/\swidth="[^"]*"/ width="34"/)) { + $svg_icon =~ s/svg/svg width="34"/ } - $out.=''; + $out.=''; $out.= $svg_icon; $out.=''; } @@ -5900,9 +5901,10 @@ $out.= sprintf ('',$htrans); $out.='' if (!$noFooter); - $out.= sprintf('',$chart_dim+84); + my $plot_width=$chart_dim+84; + $out.= sprintf ('',$plot_width,73,$plot_width,73); $out.= sprintf('', scalar @colcount ? 35:17); - + $out.= ''; @@ -6236,6 +6238,7 @@ sub bar $rotate=0 if (!defined $rotate); $iscale=1 if (!defined $iscale); $ic="" if (!defined($ic)); + $iscale/=2; } @@ -6277,13 +6280,13 @@ sub bar if (defined $icon and $icon ne "" and $icon ne " ") { my $svg_icon=::FW_makeImage($ic); - if(!($svg_icon =~ s/\sheight="[^"]*"/ height="22"/)) { - $svg_icon =~ s/svg/svg height="22"/ + if(!($svg_icon =~ s/\sheight="[^"]*"/ height="34"/)) { + $svg_icon =~ s/svg/svg height="34"/ } - if(!($svg_icon =~ s/\swidth="[^"]*"/ width="22"/)) { - $svg_icon =~ s/svg/svg width="22"/ + if(!($svg_icon =~ s/\swidth="[^"]*"/ width="34"/)) { + $svg_icon =~ s/svg/svg width="34"/ } - $out.=''; + $out.=''; $out.= $svg_icon; $out.=''; } @@ -6828,6 +6831,7 @@ sub ring $rotate=0 if (!defined $rotate); $iscale=1 if (!defined $iscale); $ic="" if (!defined($ic)); + $iscale/=2; } if (defined $icon and $icon ne "") { @@ -6888,11 +6892,11 @@ sub ring if (defined $icon and $icon ne "" and $icon ne " ") { my $svg_icon=::FW_makeImage($ic); - if(!($svg_icon =~ s/\sheight="[^"]*"/ height="18"/)) { - $svg_icon =~ s/svg/svg height="18"/ } - if(!($svg_icon =~ s/\swidth="[^"]*"/ width="18"/)) { - $svg_icon =~ s/svg/svg width="18"/ } - $out.=''; + if(!($svg_icon =~ s/\sheight="[^"]*"/ height="34"/)) { + $svg_icon =~ s/svg/svg height="34"/ } + if(!($svg_icon =~ s/\swidth="[^"]*"/ width="34"/)) { + $svg_icon =~ s/svg/svg width="34"/ } + $out.=''; $out.= $svg_icon; $out.=''; } @@ -6970,6 +6974,7 @@ sub ring2 $rotate=0 if (!defined $rotate); $iscale=1 if (!defined $iscale); $ic="" if (!defined($ic)); + $iscale/=2; } if (defined $icon and $icon ne "") { @@ -7047,11 +7052,11 @@ sub ring2 if (defined $icon and $icon ne "" and $icon ne " ") { my $svg_icon=::FW_makeImage($ic); - if(!($svg_icon =~ s/\sheight="[^"]*"/ height="15"/)) { - $svg_icon =~ s/svg/svg height="15"/ } - if(!($svg_icon =~ s/\swidth="[^"]*"/ width="15"/)) { - $svg_icon =~ s/svg/svg width="15"/ } - $out.=''; + if(!($svg_icon =~ s/\sheight="[^"]*"/ height="30"/)) { + $svg_icon =~ s/svg/svg height="30"/ } + if(!($svg_icon =~ s/\swidth="[^"]*"/ width="30"/)) { + $svg_icon =~ s/svg/svg width="30"/ } + $out.=''; $out.= $svg_icon; $out.=''; }