[Laszlo-dev] For Review: Change 20090407-hqm-h Summary: width="0" no longer makes image invisible
P T Withington
ptw at laszlosystems.com
Tue Apr 7 09:10:25 PDT 2009
It appears to me that the sprite _xscale and _yscale are only used in
debugging. It might be a good idea to remove them altogether and have
the debug printers extract the scale directly from the clip (unless
these are write-only values?) Otherwise they just make this code
confusing.
Can anyone explain why the old code was setting the scale to 1 if it
computed a scale of 0? Is there some additional edge case that we are
missing, like when you turn on stretching or something? I just recall
this code being a whole pile of Adam magic...
[Since you have checked it in, I guess I retro-actively approve, but
I'd love to know the answers to these questions.]
On 2009-04-07, at 09:55EDT, Henry Minsky wrote:
> Change 20090407-hqm-h by hqm at badtzmaru.home on 2009-04-07 09:12:54 EDT
> in /Users/hqm/openlaszlo/trunk7
> for http://svn.openlaszlo.org/openlaszlo/trunk
>
> Summary: width="0" no longer makes image invisible
>
> New Features:
>
> Bugs Fixed: LPP-7936
>
> Technical Reviewer: ptw
> QA Reviewer: max
> Doc Reviewer: (pending)
>
> Documentation:
>
> Release Notes:
>
> Details:
>
> + swf9, make sure to set scaleX,scaleY to zero if there is a width
> specified, even if it's zero. The "if" clause was getting faked out
> because "if (lzwidth && ...)" evals to false if lzwidth == 0.
>
> + swf8, allow the sprite's movieclip _xscale to go to zero, so a
> resource can become invisible.
>
> But needed to add a special case to measure resource width and height
> when _xscale == 0, in updateResourceSize(), due to calculating it from
> the sprite movieclip's _width and _xscale
>
>
> Tests:
>
> + test case from bug report, resource should be invisible (swf8, swf9)
>
> + test case from LPP-6656 still works; stretched resource in
> resizelayout visible and proper width (swf8, swf9)
>
>
>
> Files:
> M WEB-INF/lps/lfc/kernel/swf/LzSprite.as
> M WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
>
> Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20090407-hqm-h.tar
More information about the Laszlo-dev
mailing list