2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 16:56:54 +00:00

55_InfoPanel.pm: updated

git-svn-id: https://svn.fhem.de/fhem/trunk@7989 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
betateilchen 2015-02-14 22:07:48 +00:00
parent a02724fe83
commit 0e5d538ced

View File

@ -335,6 +335,16 @@ sub btIP_itemEllipse {
return $output; return $output;
} }
sub btIP_itemEmbed {
my ($id,$x,$y,$width,$height,$arg,%params) = @_;
my $embed = "<div id=\"${id}_embedded\" style=\"position:absolute; top:${y}px; left:${x}px; ".
"width:${width}px; height:${height}px; z-index:2; \" >\n".
"$arg\n".
"</div>\n";
return $embed;
}
sub btIP_itemGroup { sub btIP_itemGroup {
my($id,$type,$x,$y) = @_; my($id,$type,$x,$y) = @_;
return "</g>\n" if $type eq 'close'; return "</g>\n" if $type eq 'close';
@ -970,6 +980,16 @@ sub btIP_evalLayout {
$svg .= btIP_itemEllipse($id,$x1,$y1,$rx,$ry,$filled,$stroked,$link,%params); $svg .= btIP_itemEllipse($id,$x1,$y1,$rx,$ry,$filled,$stroked,$link,%params);
} }
when("embed") {
($id,$x,$y,$width,$height,$arg)= split("[ \t]+", $def, 6);
($x,$y)= btIP_xy($x,$y,%params);
($width,$height)= btIP_xy($width,$height,%params);
$params{xx} = $x;
$params{yy} = $y;
$arg = AnalyzePerlCommand(undef,$arg);
$defs{$name}{fhem}{div} .= btIP_itemEmbed($id,$x,$y,$width,$height,$arg,%params);
}
when("font") { when("font") {
$params{font} = $def; $params{font} = $def;
} }