Change 20100304-maxcarlson-f by maxcarlson@bank on 2010-03-04 15:54:02 PST     in /Users/maxcarlson/openlaszlo/trunk-clean     for http://svn.openlaszlo.org/openlaszlo/trunk
Change 20100304-maxcarlson-f by maxcarlson@bank on 2010-03-04 15:54:02 PST
    in /Users/maxcarlson/openlaszlo/trunk-clean
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Fix view backgroundrepeat and stretches interaction

Bugs Fixed: LPP-7714 - Components: DHTML implementation for tiling

Technical Reviewer: andre.bargull@udo.edu
QA Reviewer: hminsky

Details: Updated to address Andre's comments:
There is an entry for the backgroundrepeat setter in the reference, the setter needs to marked with "@access private" to avoid that entry: http://labs.openlaszlo.org/trunk-nightly/docs/reference/lz.view.html#LzView.prototype.$lzc$set_backgroundrepeat


The "stretches-backgroundrepeat" checks aren't right:

1) the stretches setter calls "this.$lzc$set_backgroundrepeat(false)", but false is an invalid argument

2)
> + if (backgroundrepeat && this.stretches != 'none') {
> + if ($debug) Debug.warn("Backgroundrepeat and stretches can't be on at the same time. Canceling stretches.", this);
> + this.$lzc$set_stretches('none');
> + }
> + // The kernel expects null for no backgroundrepeat
> + if (backgroundrepeat == 'norepeat') backgroundrepeat = null;

The conversion from 'norepeat' to null must be placed before the stretches check, otherwise if backgroundrepeat is set to 'norepeat', the debug warning is printed.

3)
> +function $lzc$set_backgroundrepeat( backgroundrepeat = null ){
> + this.backgroundrepeat = backgroundrepeat

The attribute must be set after the stretches setter is called when canceling stretches. Otherwise the stretches setter cancels backgroundrepeat, too.

Also, cleaned up an unneeded variable in $lzc$set_opacity().

Tests:
<canvas debug="true">
 <view stretches="both" backgroundrepeat="norepeat" />
</canvas> 



git-svn-id: d62bde4b5aa582fdf07c8d403e53e0399a7ed285@15848 fa20e4f9-1d0a-0410-b5f3-dc9c16b8b17c

mcarlson/openlaszlo,mcarlson/openlaszlo,mcarlson/openlaszlo,mcarlson/openlaszlo,mcarlson/openlaszlo,mcarlson/openlaszlo,mcarlson/openlaszlo