Not approved yet.
Issues:
1) Henry already spotted a type-oh where x and y are mixed.
2) onxscale/onyscale: The convention is for these to be private since they are
implicit events associated with the corresponding attribute.
3) I also think a good convention is to put the virtual attribute, setter, and
implicit event all together in the source.
4) This looks wrong:
> - stylenames.transform = 'WebkitTransform';
> + stylenames.scaling = 'WebkitTransform';
because stylenames.transform is used in __updateTransform.
Questions:
1) The CSS transform style allows you to build up various transformations and
is order-sensitive, it seems the SWF implementation must have a specified
order? So you have implemented a compatible order? I.e., scaling happens
before rotation, so it is in the axes of the original?
2) Your change here implies the old code was broken?
> - var xscale = this.unstretchedwidth == 0 ? 100 :
> v/this.unstretchedwidth;
> - this._xscale = xscale;
> + if (this.capabilities.scaling) {
> + this.$lzc$set_xscale(this.unstretchedwidth == 0 ? 1 :
> v/this.unstretchedwidth);
> + }
On 2010-08-11, at 15:04, Max Carlson wrote:
> Change 20100811-maxcarlson-t by [email protected] on 2010-08-11
> 12:53:33 MDT
> in /Users/maxcarlson/openlaszlo/trunk-clean
> for http://svn.openlaszlo.org/openlaszlo/trunk
>
> Summary: Add xscale any yscale attributes to view
>
> New Features: View.xscale and yscale will scale a view and all its children.
> Check capabilities.scaling to be sure your runtime supports this feature.
>
> Bugs Fixed: LPP-9272 - Add way to scale views
>
> Technical Reviewer: ptw
> QA Reviewer: hminsky
>
> Details: LzSprite.as - Add scaling capability, set to true, add
> implementations of setXScale() and setYScale().
>
> LzSprite.js - Add scaling capability, set to true where available, add
> implementations of setXScale() and setYScale(). Refactor setRotation() to
> handle multiple simultaneous transforms.
>
> swf9/LzSprite.as - Add scaling capability, set to true, add implementations
> of setXScale() and setYScale().
>
> LaszloView - Add attributes, events and setters for xscale, yscale. Update
> bounds computation code to factor in scaling.
>
> Tests: See testcase at LPP-9272
>
> Files:
> M WEB-INF/lps/lfc/kernel/swf/LzSprite.as
> M WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
> M WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
> M WEB-INF/lps/lfc/views/LaszloView.lzs
>
> Changeset:
> http://svn.openlaszlo.org/openlaszlo/patches/20100811-maxcarlson-t.tar