mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-26 16:19:32 +00:00
55_InfoPanel.pm: updated
git-svn-id: https://svn.fhem.de/fhem/trunk@7929 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
8e86b4c694
commit
38e817bd56
@ -532,37 +532,6 @@ sub btIP_itemTextBox {
|
||||
return $output;
|
||||
}
|
||||
|
||||
sub btIP_itemTicker {
|
||||
# btIP_itemTicker($id,$x,$y,$width,$speed,$text,%params);
|
||||
my ($id,$x,$y,$width,$speed,$text,%params)= @_;
|
||||
return unless(defined($text));
|
||||
$id = ($id eq '-') ? createUniqueId() : $id;
|
||||
$speed = ($speed) ? $speed : AttrVal($params{name},'refresh',60);
|
||||
my $end = $x+$width;
|
||||
my ($r,$g,$b,$a) = btIP_color($params{rgb});
|
||||
|
||||
my $output = "<defs><path id=\"tickerPath\" d=\"M$x,$y L$end,$y\" /></defs>\n";
|
||||
$output .= "<text id=\”$id\” x=\"$x\" y=\"$y\" ".
|
||||
"fill=\"rgb($r,$g,$b)\" fill-opacity=\"$a\" ".
|
||||
"font-family=\"$params{font}\" ".
|
||||
"font-style=\"$params{fontstyle}\" ".
|
||||
"font-size=\"$params{pt}px\" ".
|
||||
"font-weight=\"$params{fontweight}\" ".
|
||||
"text-anchor=\"$params{thalign}\" ".
|
||||
"text-decoration=\"$params{textdecoration}\" ".
|
||||
"alignment-baseline=\"$params{tvalign}\" >\n".
|
||||
# "$text\n".
|
||||
# "</text>\n".
|
||||
"<textPath xlink:href=\"#tickerPath\">\n$text\n".
|
||||
"<animate attributeName=\"startOffset\" values=\"$end;$x\" dur=\"${speed}s\" repeatCount=\"indefinite\" />".
|
||||
"</textPath>".
|
||||
"</text>";
|
||||
# my $animate = "<animate id=\"${id}_anim\" attributeName=\"x\" from=\"$end\" to=\"$x\" dur=\"${speed}s\" repeatCount=\"indefinite\" />";
|
||||
# return btIP_itemText("${id}_text",$x,$y,"$text\n$animate",%params);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
sub btIP_itemTime {
|
||||
my ($id,$x,$y,%params)= @_;
|
||||
$id = ($id eq '-') ? createUniqueId() : $id;
|
||||
@ -1030,15 +999,6 @@ sub btIP_evalLayout($$@) {
|
||||
}
|
||||
}
|
||||
|
||||
when("ticker") {
|
||||
($id,$x,$y,$width,$arg,$text)= split("[ \t]+", $def, 6);
|
||||
($x,$y)= btIP_xy($x,$y,%params);
|
||||
$params{xx} = $x;
|
||||
$params{yy} = $y;
|
||||
$text= AnalyzePerlCommand(undef, $text);
|
||||
$svg .= btIP_itemTicker($id,$x,$y,$width,$arg,$text,%params);
|
||||
}
|
||||
|
||||
when("time") {
|
||||
($id,$x,$y)= split("[ \t]+", $def, 3);
|
||||
($x,$y)= btIP_xy($x,$y,%params);
|
||||
|
@ -272,13 +272,4 @@ textboxalign justify
|
||||
#
|
||||
textbox - 210 50 180 50 "http://www.fhem.de" "Ich bin eine Textbox und wenn man mich anklickt geht es direkt zu www.fhem.de"
|
||||
|
||||
|
||||
# ticker
|
||||
# Format: ticker <id> <x> <y> <width> <speed> <text>
|
||||
#
|
||||
|
||||
pt 20
|
||||
rgb "FF0000FF"
|
||||
ticker - 10 100 180 0 "Ich bin ein Ticker"
|
||||
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user