2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-08 07:24:21 +00:00

98_SVG.pm: fix captionPos bug (by andre, Forum #70082)

git-svn-id: https://svn.fhem.de/fhem/trunk@14130 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2017-04-28 20:36:25 +00:00
parent aad5b90146
commit a2b85ea406

View File

@ -2129,7 +2129,7 @@ SVG_render($$$$$$$$$$)
my $caption_anchor = "end";
if( $caption_pos eq 'auto' ) {
my $a = $conf{lAxis}[$i];
my $axis = 1; $axis = $1 if( $a =~ m/x\d+y(\d+)/ );
my $axis = 1; $axis = $1 if( $a && $a =~ m/x\d+y(\d+)/ );
if( $axis <= $nr_left_axis ) {
$caption_anchor = "beginning";
} else {
@ -2148,10 +2148,10 @@ SVG_render($$$$$$$$$$)
next if( !$t );
my $txtoff2;
if( $caption_anchor eq 'beginning' ) {
$txtoff2 = $off2 + $th/1.3 + $th * $li;
$txtoff2 = $y + 3 + $th/1.3 + $th * $li;
++$li;
} else {
$txtoff2 = $off2 + $th/1.3 + $th * $ri;
$txtoff2 = $y + 3 + $th/1.3 + $th * $ri;
++$ri;
}