我创建了一个视图,它将缩放特定视图中的视图。代码在OL 3.3中正常工作,但它不适用于OL 4.9
答案 0 :(得分:2)
视图缩放的工作方式已经改变,首先是with the 4.0 release(因为当时浏览器不支持缩放嵌套的div)。对于OpenLaszlo 4.9,xscale和yscale属性被添加到视图中。查看相应的JIRA以了解详情:http://jira.openlaszlo.org/jira/browse/LPP-9865
这是一个简单的例子,它适用于OpenLaszlo 5.0的两个运行时:
<canvas>
<class name="testbox" width="120" height="120" bgcolor="blue">
<text text="${'xscale=' + parent.xscale + ' / yscale=' + parent.yscale}" fgcolor="white"/>
<view x="30" y="30" width="60" height="60" bgcolor="red"></view>
</class>
<testbox x="20" y="50" />
<testbox x="20" y="200" xscale="2"/>
<testbox x="20" y="350" yscale="1.5"/>
</canvas>
以下是使用DHTML运行时5.0运行应用程序的截图: