PDA

View Full Version : problem with stretches subviews


LiPSE
11-20-2008, 11:52 PM
With OL 4.0.5, stretches was working fine with subviews, but doesn't display right in 4.1.1
Ex :
<canvas width="995" height="594" bgcolor="0xfefefe">
<view id="bg" width="594" height="594" bgcolor="0xffffff" x="0" y="0" clip="true">
<view id="wall" width="500" height="500" bgcolor="0xffeeff" x="47" y="30" clip="false">
<view id="zoom" width="500" height="500" x="${(mur.width-this.width)/2}" y="${(mur.height-this.height)/2}" stretches="both">
<image id="photo0" src="" forcereload="true" x="${(500-this.width)/2}" y="${(500-this.height)/2}" />
</view>
</view>
</view>
<handler name="oninit">
<![CDATA[ photo0.setAttribute('src','http://www.google.fr/images/nav_logo3.png') ]]>
</handler>
</canvas>
In 4.0.5, the example above work fine, but in 4.1.1, it doesn't display photo0.

This is a great problem because it was fine to have one zoom for many subviews in complex rich client application, and I think there are many users who think so. Will this problem be review ?

I had read that this problem has a reason : non compatibility with dhtml (http://www.openlaszlo.org/jira/browse/LPP-3637). But what about upload and other components no compatible with dhtml ? Will they be deleted or may you consider that laszlo may have many features, and some specific to dhtml and some other specific to flash ?

rcyeager
12-03-2008, 08:16 AM
Suggest commenting on that Jira if you think it should be changed.

Robert Yeager
http://www.qrowd.com
http://www.cooqy.com

kbriggs
05-05-2012, 12:07 PM
Just came across this issue myself upgrading from 4.1 Flash 8 to 4.9 Flash 10. Previously, a stretches="both" on the outer view automatically scaled all my inner views correctly. This no longer works. What does work is removing the stretches attribute and replacing it with xscale and yscale attributes like this:

<view xscale="${width/w}" yscale="${height/h}" resource="...">

Replace w and h with the original width and height values of the view. Now everything inside scales along with it, including all external resources.