> +/** @access private */
> +function $lzc$set_backgroundrepeat( backgroundrepeat = 'norepeat' ){Setters must not have default arguments. On 3/5/2010 1:00 AM, Max Carlson wrote: > Change 20100304-maxcarlson-f by maxcarl...@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: [email protected] > 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> > > Files: > M WEB-INF/lps/lfc/views/LaszloView.lzs > > Changeset: > http://svn.openlaszlo.org/openlaszlo/patches/20100304-maxcarlson-f.tar > _______________________________________________ Laszlo-reviews mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews
