mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
98_SVG.pm: do not crash when plotSize is not set (Forum #97977)
git-svn-id: https://svn.fhem.de/fhem/trunk@18777 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
be837ed681
commit
22efb2da69
@ -149,7 +149,7 @@ SVG_AttrFn(@)
|
||||
{
|
||||
my ($cmd,$name,$aName,$aVal) = @_;
|
||||
|
||||
if($aName eq "captionLeft" && $cmd eq "set") {
|
||||
if($aName && $aName eq "captionLeft" && $cmd eq "set") {
|
||||
my $dir = (!defined($aVal) || $aVal) ? "left" : "right";
|
||||
AnalyzeCommand(undef, "attr $name captionPos $dir");
|
||||
return "attr $name captionLeft converted to attr $name captionPos $dir";
|
||||
@ -179,8 +179,9 @@ sub
|
||||
SVG_getplotsize($)
|
||||
{
|
||||
my ($d) = @_;
|
||||
return $FW_webArgs{plotsize} ?
|
||||
$FW_webArgs{plotsize} : AttrVal($d,"plotsize",$FW_plotsize);
|
||||
return $FW_webArgs{plotsize} ?
|
||||
$FW_webArgs{plotsize} :
|
||||
AttrVal($d,"plotsize", $FW_plotsize ? $FW_plotsize : "800,400");
|
||||
}
|
||||
|
||||
sub
|
||||
|
Loading…
Reference in New Issue
Block a user