From f33ef6f07528e3a510a2c597b94aa41780ae05a6 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Sat, 20 Sep 2014 17:15:08 +0000 Subject: [PATCH] adding plotEmbed parameter for iOS 8 git-svn-id: https://svn.fhem.de/fhem/trunk@6583 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/01_FHEMWEB.pm | 3 ++- fhem/FHEM/98_SVG.pm | 52 ++++++++++++++++++++++++++++++----------- 2 files changed, 41 insertions(+), 14 deletions(-) diff --git a/fhem/FHEM/01_FHEMWEB.pm b/fhem/FHEM/01_FHEMWEB.pm index cdd7bd2f8..3dea518d3 100755 --- a/fhem/FHEM/01_FHEMWEB.pm +++ b/fhem/FHEM/01_FHEMWEB.pm @@ -78,6 +78,7 @@ use vars qw($FW_cmdret); # Returned data by the fhem call use vars qw($FW_room); # currently selected room use vars qw($FW_formmethod); use vars qw(%FW_visibleDeviceHash); +use vars qw(@FW_httpheader); # HTTP header, line by line $FW_formmethod = "post"; @@ -90,7 +91,6 @@ my $FW_lastHashUpdate = 0; ######################### # As we are _not_ multithreaded, it is safe to use global variables. # Note: for delivering SVG plots we fork -my @FW_httpheader; # HTTP header, line by line my @FW_enc; # Accepted encodings (browser header) my $FW_data; # Filecontent from browser when editing a file my %FW_icons; # List of icons @@ -152,6 +152,7 @@ FHEMWEB_Initialize($) ploteditor:always,onClick,never plotfork:1,0 plotmode:gnuplot,gnuplot-scroll,SVG + plotEmbed:0,1 plotsize nrAxis redirectCmds:0,1 diff --git a/fhem/FHEM/98_SVG.pm b/fhem/FHEM/98_SVG.pm index 459e0b6bc..f90706c8e 100755 --- a/fhem/FHEM/98_SVG.pm +++ b/fhem/FHEM/98_SVG.pm @@ -32,7 +32,7 @@ sub SVG_doround($$$); sub SVG_fmtTime($$); sub SVG_pO($); sub SVG_readgplotfile($$); -sub SVG_render($$$$$$$$$); +sub SVG_render($$$$$$$$$;$$); sub SVG_showLog($); sub SVG_substcfg($$$$$$); sub SVG_time_align($$); @@ -182,8 +182,19 @@ SVG_FwFn($$$$) if(AttrVal($d,"plotmode",$FW_plotmode) eq "SVG") { my ($w, $h) = split(",", AttrVal($d,"plotsize",$FW_plotsize)); $ret .= "