mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-21 14:04:15 +00:00
55_InfoPanel.pm: updated
git-svn-id: https://svn.fhem.de/fhem/trunk@7967 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
81e44f3703
commit
ec2251f93d
@ -332,7 +332,7 @@ sub btIP_itemGroup {
|
|||||||
|
|
||||||
sub btIP_itemImg {
|
sub btIP_itemImg {
|
||||||
return unless $useImgTools;
|
return unless $useImgTools;
|
||||||
my ($id,$x,$y,$scale,$srctype,$arg,$link,%params)= @_;
|
my ($id,$x,$y,$scale,$link,$srctype,$arg,%params)= @_;
|
||||||
$id = ($id eq '-') ? createUniqueId() : $id;
|
$id = ($id eq '-') ? createUniqueId() : $id;
|
||||||
return unless(defined($arg));
|
return unless(defined($arg));
|
||||||
return if($arg eq "");
|
return if($arg eq "");
|
||||||
@ -711,9 +711,10 @@ sub btIP_findTarget {
|
|||||||
|
|
||||||
sub btIP_xy {
|
sub btIP_xy {
|
||||||
my ($x,$y,%params)= @_;
|
my ($x,$y,%params)= @_;
|
||||||
|
$x = $params{width} if ($x eq 'max');
|
||||||
$x = $params{xx} if($x eq 'x');
|
$y = $params{height} if ($y eq 'max');
|
||||||
$y = $params{yy} if($y eq 'y');
|
$x = $params{xx} if ($x eq 'x');
|
||||||
|
$y = $params{yy} if ($y eq 'y');
|
||||||
if((-1 < $x) && ($x < 1)) { $x *= $params{width}; }
|
if((-1 < $x) && ($x < 1)) { $x *= $params{width}; }
|
||||||
if((-1 < $y) && ($y < 1)) { $y *= $params{height}; }
|
if((-1 < $y) && ($y < 1)) { $y *= $params{height}; }
|
||||||
return($x,$y);
|
return($x,$y);
|
||||||
@ -971,14 +972,14 @@ sub btIP_evalLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
when("img") {
|
when("img") {
|
||||||
($id,$x,$y,$scale,$srctype,$arg,$link) = split("[ \t]+", $def,7);
|
($id,$x,$y,$scale,$link,$srctype,$arg) = split("[ \t]+", $def,7);
|
||||||
($x,$y) = btIP_xy($x,$y,%params);
|
($x,$y) = btIP_xy($x,$y,%params);
|
||||||
$params{xx} = $x;
|
$params{xx} = $x;
|
||||||
$params{yy} = $y;
|
$params{yy} = $y;
|
||||||
$arg = AnalyzePerlCommand(undef, $arg);
|
$arg = AnalyzePerlCommand(undef,$arg);
|
||||||
$link = AnalyzePerlCommand(undef,$link);
|
$link = AnalyzePerlCommand(undef,$link);
|
||||||
my($output,$width,$height)= btIP_itemImg($id,$x,$y,$scale,$srctype,$arg,$link,%params);
|
my($output,$width,$height)= btIP_itemImg($id,$x,$y,$scale,$link,$srctype,$arg,%params);
|
||||||
$svg .= $output;
|
$svg .= $output;
|
||||||
$params{xx} = $x;
|
$params{xx} = $x;
|
||||||
$params{yy} = $y+$height;
|
$params{yy} = $y+$height;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user