Hm... if that is really the bug, then border and shadow should be swapped too, 
to be accurate.  In theory, the shadow and border should not overlap, but if 
they did, the stacking order should be (top to bottom):

    children of view
    view inner shadow
  view
  view border
  view outer shadow
parent of view

My understanding was that by setting the view, border, and shadow to the same 
index, the previous element at that index would be moved higher in the z-index, 
which is why I intentionally put them in that order.

You'll want to verify that a view with clipping and a shadow correctly clips 
its children and not its shadow.  Grep Jira for a test case.

On 2011-06-13, at 15:48, [email protected] wrote:

> Author: pbr
> Date: 2011-06-13 12:48:06 -0700 (Mon, 13 Jun 2011)
> New Revision: 19208
> 
> Modified:
>   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
> Log:
> Change philip-20110613-SQk by philip@PHILIP-I7 on 2011-06-13 15:38:41 EDT
>    in /cygdrive/c/clients/laszlo/svn/openlaszlo/trunk
>    for http://svn.openlaszlo.org/openlaszlo/trunk
> 
> Summary: Make sure bringToFront() works with shadows
> 
> New Features:
> 
> Bugs Fixed: LPP-9963
> 
> Technical Reviewer: (pending)
> QA Reviewer: dju
> Doc Reviewer: (pending)
> 
> Documentation:
> 
> Release Notes:
> 
> Overview:
> 
> 
> Details:
> This was a bug in the sprite. The shadow/border was moved to the front after 
> the object. The solution is to move the shadow/border before moving the 
> object.
> 
> 
> Tests:
> Test app in jira report. Clicking the button moves the view to the front. The 
> shadow is now correctly behind the child view.
> 
> Files:
> M       WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
> 
> Changeset: 
> http://svn.openlaszlo.org/openlaszlo/patches/philip-20110613-SQk.tar 
> 
> 
> Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
> ===================================================================
> --- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as  2011-06-13 
> 19:46:16 UTC (rev 19207)
> +++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as  2011-06-13 
> 19:48:06 UTC (rev 19208)
> @@ -1670,17 +1670,17 @@
> 
>   private function setIndex(index:int) {
>     // Our border and outer shadow sit just behind us in our parent's
> -    // display list.  Inner shadow is our child.
> -    parent.setChildIndex(this, index);
> +    // display list.  Inner shadow is our child. Move the border and shadow
> +    // before moving this.
>     if (bordershape) { parent.setChildIndex(bordershape, index); }
>     if (shadowshape && (shadowblurradius >= 0)) { 
> parent.setChildIndex(shadowshape, index); }
> +    parent.setChildIndex(this, index);
>   }
> 
>     /** bringToFront()
>         o Brings this sprite to the front of its siblings 
>     */
>     public function bringToFront ():void {
> -//PBR
>         if (!this.isroot && parent) {
>           setIndex(parent.numChildren-1);
>         }
> 
> 
> _______________________________________________
> Laszlo-checkins mailing list
> [email protected]
> http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins


Reply via email to