plotEmbed
- If set (to 1), SVG plots will be rendered as part of <embed>
+ If set to 1, SVG plots will be rendered as part of <embed>
tags, as in the past this was the only way to display SVG. Setting
plotEmbed to 0 (the default) will render SVG in-place.
+ Setting plotEmbed to 2 will load the SVG via JavaScript, in order to
+ enable parallelization without the embed tag.
@@ -4690,11 +4693,13 @@ FW_show($$)
-
plotEmbed 0
- Falls gesetzt (auf 1), dann werden SVG Grafiken mit <embed> Tags
+
plotEmbed
+ Falls 1, dann werden SVG Grafiken mit <embed> Tags
gerendert, da auf älteren Browsern das die einzige
Möglichkeit war, SVG dastellen zu können. Falls 0 (die
Voreinstellung), dann werden die SVG Grafiken "in-place" gezeichnet.
+ Falls 2, dann werden die Grafiken per JavaScript nachgeladen, um eine
+ Parallelisierung auch ohne embed Tags zu ermöglichen.
diff --git a/fhem/FHEM/98_SVG.pm b/fhem/FHEM/98_SVG.pm
index ffc456961..6cfc98b7c 100644
--- a/fhem/FHEM/98_SVG.pm
+++ b/fhem/FHEM/98_SVG.pm
@@ -49,6 +49,9 @@ sub SVG_getControlPoints($);
sub SVG_calcControlPoints($$$$$$);
my %SVG_devs; # hash of from/to entries per device
+my $SVG_hdr = 'version="1.1" xmlns="http://www.w3.org/2000/svg" '.
+ 'xmlns:xlink="http://www.w3.org/1999/xlink" '.
+ 'data-origin="FHEM"';
#####################################
@@ -185,7 +188,7 @@ SVG_getplotsize($)
}
sub
-SVG_isEmbed($)
+SVG_embed()
{
return AttrVal($FW_wname, "plotEmbed", 0);
}
@@ -238,10 +241,16 @@ SVG_FwFn($$$$)
if($pm eq "SVG") {
$ret .= "