[Laszlo-checkins] r10610 - openlaszlo/trunk/docs/src/developers
lou@openlaszlo.org
lou at openlaszlo.org
Wed Aug 6 07:14:09 PDT 2008
Author: lou
Date: 2008-08-06 07:13:48 -0700 (Wed, 06 Aug 2008)
New Revision: 10610
Modified:
openlaszlo/trunk/docs/src/developers/colors.dbk
Log:
Change 20080806-lou-h by lou at loumac.local on 2008-08-06 10:09:03 AST
in /Users/lou/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: dguide, color chapter: add IE7 opacity issues
Bugs Fixed: LPP-5382, LPP-5370
Technical Reviewer: (pending)
QA Reviewer: mcarlson
Doc Reviewer: (pending)
Details: copy the IE7 opacity issues from the 4.1.1 release notes into the dguide
Tests: visual verify
Modified: openlaszlo/trunk/docs/src/developers/colors.dbk
===================================================================
--- openlaszlo/trunk/docs/src/developers/colors.dbk 2008-08-06 14:12:49 UTC (rev 10609)
+++ openlaszlo/trunk/docs/src/developers/colors.dbk 2008-08-06 14:13:48 UTC (rev 10610)
@@ -87,7 +87,6 @@
</programlisting>
</example>
-
<para/></section><section><title>Opacity</title>
<para>
In OpenLaszlo, a view has a color and an opacity which are handled separately. The <literal>opacity</literal> attribute ranges from 0 (transparent) to 1 (opaque).
@@ -102,7 +101,53 @@
<para>When a view's <literal>opacity</literal> is set to 0, the <literal>visible</literal> attribute of that view turns to false.</para>
-
+</section>
+ <section><title>DHTML with Windows Internet Explorer: Opacity Issues</title>
+ <section><title>Internet Explorer: <literal>overflow="visible"</literal> Doesn't Work with <literal>opacity</literal></title>
+ <para>If you use the IE alpha-filter to set the opacity, the overflow will always be changed to <literal>hidden</literal>. The example below provides a workaround for this issue:</para>
+ <programlisting>
+ <canvas >
+ <!-- the image will be clipped in IE DHTML due to nested opacity -->
+ <view opacity=".6" width="150" height="60" bgcolor="red">
+ <view width="${canvas.width}" height="60" resource="http:Unbenannt.png" stretches="both"/>
+ </view>
+
+ <!-- Moving the image to be a sibling fixes the issue-->
+ <view y="200" opacity=".6" width="150" height="60" bgcolor="red"/>
+ <view y="200" opacity=".6" width="${canvas.width}" height="60" resource="http:Unbenannt.png" stretches="both"/>
+ </canvas></programlisting>
+ </section>
+
+ <section><title>Internet Explorer 7 DHTML Doesn't honor view opacity for stacked (overlayed) views</title>
+ <para>If you have a shadow view that uses a partial opacity setting underneath another view to create a shadow effect, the topmost view overlaying the shadow disappears in Windows Internet Explorer 7, using DHTML. The following example shows the problem:</para>
+ <programlisting>
+ <canvas width="100%" height="100%" validate="false" debug="true" proxied="false" bgcolor="0x00aaaa">
+ <view width="300" height="100">
+ <view width="300" height="100" bgcolor="black" opacity="0.3"/>
+ <view width="150" height="50" bgcolor="red"/>
+ </view>
+ <button text="Click me" onclick="canvas.setAttribute('opacity', 0.50)"/>
+ </canvas></programlisting>
+ <para>In this test, the red view and the button disappear when the button is clicked, instead of receiving 50% opacity. You can work around this issue in Internet Explorer 7 DHTML to get the same effect, as follows:</para><programlisting>
+ <canvas width="100%" height="100%" validate="false" debug="true" proxied="false" bgcolor="0x00aaaa">
+ <simplelayout/>
+ <!-- This example hides the red box when the button is clicked in IE DHTML -->
+ <view width="300" height="100" name="root">
+ <view width="300" height="100" bgcolor="black" opacity="0.3"/>
+ <view width="150" height="50" bgcolor="red"/>
+ </view>
+ <button text="Click me" onclick="root.setAttribute('opacity', 0.50)"/>
+ <!-- By avoiding nesting views with opacity, we can get the same effect and it works in IE DHTML-->
+ <view width="300" height="100" name="container">
+ <view width="300" height="100" bgcolor="black" opacity="0.3"/>
+ <view width="300" height="100" name="root">
+ <view width="150" height="50" bgcolor="red"/>
+ </view>
+ </view>
+ <button text="Click me" onclick="container.root.setAttribute('opacity', 0.50)"/>
+ </canvas></programlisting>
+ </section>
+
<para/></section></section><section><title>When Red Isn't Red</title>
<para>
More information about the Laszlo-checkins
mailing list