[Laszlo-dev] For Review: Change 20080429-maxcarlson-G Summary: Fix braino in replicators
Philip Romanik
promanik at laszlosystems.com
Tue Apr 29 16:52:50 PDT 2008
Sorry, I'll rephrase. The patch has changes, but running
<http://localhost:8080/trunk-clean/test/explicit-replicators/test-repl>http://localhost:8080/trunk-clean/test/explicit-replicators/test-replicator.lzx
appears to run the same as before/after the patch is applied.
>Strange - I just downloaded and applied the patch and it shows the
>following changes:
>
>Roboto:trunk-clean maxcarlson$ ./20080429-maxcarlson-G/apply.sh
>patching file lps/components/utils/replicator/replicator.lzx
>Roboto:trunk-clean maxcarlson$ svn diff
>lps/components/utils/replicator/replicator.lzx
>Index: lps/components/utils/replicator/replicator.lzx
>===================================================================
>--- lps/components/utils/replicator/replicator.lzx (revision 8907)
>+++ lps/components/utils/replicator/replicator.lzx (working copy)
>@@ -137,7 +137,7 @@
>
> // @keywords private
> function init() {
>- super.init.apply(this, arguments);
>+ super.init();
> if (this.dataset && this.xpath) {
> this._pointer = this.dataset.getPointer();
> this._ondatadel = new LzDelegate(this, '_updateChildren',
> this.dataset, 'onDocumentChange') @@ -267,7 +267,7 @@
> var v;
> if ( this._clonepool.length ) {
> v = this._clonepool.pop();
>- if (v.visible != true) v.setVisible( true );
>+ if (v.visible != true) v.setAttribute('visible', true );
> } else {
> v = this._makeClone();
> }
>@@ -286,7 +286,7 @@
> // @keywords private
> function poolClone (c) {
> if ( c.clonenumber ) this.unbind( c );
>- if (c.visible != false) c.setVisible( false );
>+ if (c.visible != false) c.setAttribute('visible', false );
> this._clonepool.push( c );
> }
>
>@@ -352,16 +352,15 @@
> // the mask
> // @param Number n: The offset of the clone to scroll in view
> function ensureInView (n) {
>-
>+ var y = this.container.y;
> var pos = n*this.replicatedsize;
>- var ny = this.y;
>+ var ny = y;
>
>- if ( this.replicatedsize+pos >= mask.height -this.y) {
>- ny = mask.height - pos-this.replicatedsize;
>- } else if ( pos < -this.y ) ny = -pos;
>+ if (this.replicatedsize+pos >= this.mask.height - y) {
>+ ny = this.mask.height - pos - this.replicatedsize;
>+ } else if (pos < -y) ny = -pos;
>
>- if ( this.y != ny ) this.setY( ny );
>-
>+ if (y != ny) this.container.setY(ny);
> }
> }
> ]]>
>
>Philip Romanik wrote:
> > I don't see any difference before/after this change is applied. What
> > should be different?
> >
> >> Change 20080429-maxcarlson-G by maxcarlson at Roboto on 2008-04-29
> >> 10:49:28 PDT
> >> in /Users/maxcarlson/openlaszlo/trunk-clean
> >> for
> <http://svn.openlaszlo.org/openlaszlo/trunk>http://svn.openlaszlo.org/openlaszlo/trunk
> >>
> >> Summary: Fix braino in replicators
> >>
> >> New Features:
> >>
> >> Bugs Fixed: LPP-5864 - replicator.ensureInView() should use container
> >> reference for position
> >>
> >> Technical Reviewer: promanik
> >> QA Reviewer: ptw
> >> Doc Reviewer: (pending)
> >>
> >> Documentation:
> >>
> >> Release Notes:
> >>
> >> Details: Changed to use Maynard's version of ensureInView().
> >>
> >>
> >> Tests:
> >>
> <http://localhost:8080/trunk-clean/test/explicit-replicators/test-repl>http://localhost:8080/trunk-clean/test/explicit-replicators/test-repl
> >> icator.lzx
> >>
> >> in swf and dhtml
> >>
> >> Files:
> >> M lps/components/utils/replicator/replicator.lzx
> >>
> >> Changeset:
> >>
> <http://svn.openlaszlo.org/openlaszlo/patches/20080429-maxcarlson-G.ta>http://svn.openlaszlo.org/openlaszlo/patches/20080429-maxcarlson-G.ta
> >> r
>
>--
>Regards,
>Max Carlson
>OpenLaszlo.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20080429/29176eaa/attachment.html
More information about the Laszlo-dev
mailing list