Change ptw-20100904-wHA by [email protected] on 2010-09-04 12:09:31 EDT in /Users/ptw/OpenLaszlo/trunk-3 for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Update view linkage to actually work Bugs Fixed: LPP-9333 lz.view getAttributeRelative() doesn't work with nested views inside a view that has xscale/yscale Technical Reviewer: [email protected] (pending) QA Reviewer: [email protected] (pending) Doc Reviewer: [email protected] (pending) Overview: The linkage transform computation was really broken. It had what appears to be some attempt at optimizing the case of one of the views being an ancestor of the other, but that only worked when that view was the canvas. Additionally, the view computation of width/height did not take into account the (apparently intentional) policy that a view's scale affects its own width/height (but not its own x/y). This change simplifies and regularizes the linkage transform computation. The basic outline is that it now computes two separate transforms from each of the argument views in the coordinate space of their shared ancestor and then composes those two transforms to get the transform from the source to the destination. The relative operators in <view> have been updated to take scaling into account for width/height. Details: lztest-view: Incorporated Max's updates to reduce errors signalled due to float math noise. Added Kathryn's test case. Added some additional test cases for nested scaled views and transformations between views that are not direct ancestor/descendants. Added tests to verify that setAttributeRelative still works with the corrected transform computation. LzViewLinkage: Essentially rewritten from scratch, per the above, with some documentation of what is trying to be accomplished, for future generations. Removed the gratuitous 'point' objects in favor of just storing the transformation coordinates. Yes, this means the callers either have to cons up a string as an accessor or be a little more complex. LaszloView: Update relative operators to not use the linkage point objects and to take source and destination view scale into account for height/width computations. Update the documentation for these operators to be English and to match the apparent expected semantics. Tests: Updated view test in all runtimes. Files: M test/lztest/lztest-view.lzx M WEB-INF/lps/lfc/views/LzViewLinkage.lzs M WEB-INF/lps/lfc/views/LaszloView.lzs Changeset: http://svn.openlaszlo.org/openlaszlo/patches/ptw-20100904-wHA.tar
