2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 16:56:54 +00:00

98_SVG.pm/01_FHEMWEB.pm: do not set plotEmbed for iOS (Forum #27211)

git-svn-id: https://svn.fhem.de/fhem/trunk@8965 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2015-07-14 13:56:38 +00:00
parent c3ec4c2a4d
commit 9ec1c99b35
3 changed files with 5 additions and 11 deletions

View File

@ -2890,11 +2890,9 @@ FW_widgetOverride($$)
<li>plotEmbed 0<br> <li>plotEmbed 0<br>
SVG plots are rendered as part of &lt;embed&gt; tags, as in the past SVG plots are rendered as part of &lt;embed&gt; tags, as in the past
this was the only way to display SVG, and it allows to render them in this was the only way to display SVG, and it allows to render them in
parallel, see plotfork. As of iOS 8, if FHEMWEB is called from the Home parallel, see plotfork.
Screen, the SVG is fetched but not displayed, which is IMHO a bug.
Setting plotEmbed to 0 will render SVG in-place, but as a side-effect Setting plotEmbed to 0 will render SVG in-place, but as a side-effect
makes the plotfork attribute meaningless.<br> makes the plotfork attribute meaningless.<br>
This attribute defaults to 0 on iOS8 devices, and 1 elsewhere.
</li><br> </li><br>
@ -3569,13 +3567,9 @@ FW_widgetOverride($$)
SVG Grafiken werden als Teil der &lt;embed&gt; Tags dargestellt, da SVG Grafiken werden als Teil der &lt;embed&gt; Tags dargestellt, da
fr&uuml;her das der einzige Weg war SVG darzustellen, weiterhin fr&uuml;her das der einzige Weg war SVG darzustellen, weiterhin
erlaubt es das parallele Berechnen via plotfork (s.o.) erlaubt es das parallele Berechnen via plotfork (s.o.)
Ab iOS 8 werden SVG Grafiken in einem embed Tag nicht dargestellt,
falls FHEMWEB vom HomeScreen gestartet wurde (mAn ist das ein Bug in
iOS8).
Falls plotEmbed auf 0 gesetzt wird, dann werden die SVG Grafiken als Falls plotEmbed auf 0 gesetzt wird, dann werden die SVG Grafiken als
Teil der HTML-Seite generiert, was leider das plotfork Attribut Teil der HTML-Seite generiert, was leider das plotfork Attribut
wirkungslos macht. Die Voreinstellung ist 0 auf iOS 8 Ger&auml;ten, und wirkungslos macht.
1 sonst.
</li><br> </li><br>

View File

@ -162,8 +162,8 @@ SVG_getplotsize($)
sub sub
SVG_isEmbed($) SVG_isEmbed($)
{ {
return (AttrVal($FW_wname, "plotEmbed", return (AttrVal($FW_wname, "plotEmbed", 1));
$FW_userAgent !~ m/(iPhone|iPad|iPod).*OS (8|9)/)); # $FW_userAgent !~ m/(iPhone|iPad|iPod).*OS (8|9)/));
} }
################## ##################

View File

@ -134,7 +134,7 @@ sv_menu(evt, embed)
"translate(0,"+ (h/y_mul+y_min-h/ny_mul-ny_min)*y_mul +") "+ "translate(0,"+ (h/y_mul+y_min-h/ny_mul-ny_min)*y_mul +") "+
"scale(1, "+ (y_mul/ny_mul) +") "; "scale(1, "+ (y_mul/ny_mul) +") ";
o.setAttribute("transform", tr); o.setAttribute("transform", tr);
doc.documentElement.appendChild(o); svgNode.appendChild(o);
} }
//show/hide //show/hide