2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-22 20:24:36 +00:00

98_SVG.pm: remove multiple zoom buttons for plotEmbed=0/plotFork=1

git-svn-id: https://svn.fhem.de/fhem/trunk@17255 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2018-09-02 14:45:43 +00:00
parent 27cfdd9258
commit 6c8440f93a
2 changed files with 3 additions and 1 deletions

View File

@ -1908,7 +1908,7 @@ FW_showRoom()
my $doBC = (AttrVal($FW_wname, "plotfork", 0) && my $doBC = (AttrVal($FW_wname, "plotfork", 0) &&
AttrVal($FW_wname, "plotEmbed", 0) == 0); AttrVal($FW_wname, "plotEmbed", 0) == 0);
my %res; my %res;
my $idx = 1; my ($idx,$svgIdx) = (1,1);
@atEnds = sort { $sortIndex{$a} cmp $sortIndex{$b} } @atEnds; @atEnds = sort { $sortIndex{$a} cmp $sortIndex{$b} } @atEnds;
foreach my $d (@atEnds) { foreach my $d (@atEnds) {
no strict "refs"; no strict "refs";
@ -1916,6 +1916,7 @@ FW_showRoom()
$extPage{group} = "atEnd"; $extPage{group} = "atEnd";
$extPage{index} = $idx++; $extPage{index} = $idx++;
if($doBC && $defs{$d}{TYPE} eq "SVG" && $FW_use{base64}) { if($doBC && $defs{$d}{TYPE} eq "SVG" && $FW_use{base64}) {
$extPage{svgIdx} = $svgIdx++;
BlockingCall(sub { BlockingCall(sub {
return "$FW_cname,$d,". return "$FW_cname,$d,".
encode_base64(&{$fn}($FW_wname,$d,$FW_room,\%extPage),''); encode_base64(&{$fn}($FW_wname,$d,$FW_room,\%extPage),'');

View File

@ -222,6 +222,7 @@ SVG_FwFn($$$$)
my $ret = ""; my $ret = "";
my $isFirst = (!$pageHash || !$pageHash->{svgLoaded}); my $isFirst = (!$pageHash || !$pageHash->{svgLoaded});
$isFirst = 0 if($pageHash && $pageHash->{svgIdx} && $pageHash->{svgIdx} != 1);
$pageHash->{svgLoaded} = 1 if($pageHash); $pageHash->{svgLoaded} = 1 if($pageHash);
$ret .= "<script type='text/javascript' src='$FW_ME/pgm2/svg.js'></script>" $ret .= "<script type='text/javascript' src='$FW_ME/pgm2/svg.js'></script>"
if($isFirst); if($isFirst);