this.updateDelegate.register( this.watchedview, "on" + this.axis ); this.axis = a; (this.sizeAxis = a) == "x" ? "width" : "height"; 0) { if (! this.subviews[this.leftmost]) { // deleted leftmost, reset to end if (this.trace) Debug.write('Deleted, reset'); this.leftmost = 0; } this.update(); } ]]> = leftedge && c <= rightedge ); if (l == 1) break; c += this.spacing + this.subviews[i][this.sizeAxis]; if (++i == l) i = 0; } while (i != this.leftmost) var rightmost = this.leftmost - 1; if (rightmost == -1) rightmost = l - 1; //if (this.trace) Debug.write('leftedge : ' + leftedge + ' rightedge : '+ rightedge + " leftmost : " + leftmost + " rightmost : " + rightmost); //if (this.trace) Debug.write('this.subviews[leftmost][this.axis] : ' + this.subviews[leftmost][this.axis]); // this.axis is "x" attribute // this.sizeAxis is "width" attribute // If the leftedge moves if (leftedge < this.subviews[this.leftmost][this.axis] && direction > 0) { //if (this.trace) Debug.write('crossed left'); //fill in left.... this.subviews[rightmost].setAttribute(this.axis, this.subviews[this.leftmost][this.axis] - this.subviews[rightmost][this.sizeAxis] - this.spacing); //this.subviews[rightmost].setAttribute("visible", true); leftedge = 0; this.leftmost = rightmost; if (rightmost == 0) { rightmost = l - 1; } else { rightmost = rightmost - 1; } //if (this.trace) Debug.write('leftmost : ' + this.leftmost + " rightmost : " + rightmost); this.locked = false; return; } // this.axis is "x" attribute // this.sizeAxis is "width" attribute if (this.subviews[rightmost][this.axis] + this.subviews[rightmost][this.sizeAxis] < rightedge && direction < 0) { //if (this.trace) Debug.write('crossed right leftmost : ' + this.leftmost + " rightmost : " + rightmost); //var str = "x pos : " + this.subviews[rightmost][this.axis] + " view width : " + this.subviews[rightmost][this.sizeAxis]; //str = str.concat(" rightedge : " + rightedge); //if (this.trace) Debug.write(str); //fill in right.... // Update 1st subview (x pos) to follow last subview this.subviews[this.leftmost].setAttribute(this.axis, this.subviews[rightmost][this.axis] + this.subviews[rightmost][this.sizeAxis] + this.spacing); rightmost = this.leftmost; if (this.leftmost == l - 1) { this.leftmost = 0; } else { this.leftmost++; } //if (this.trace) Debug.write('leftmost : ' + this.leftmost + " rightmost : " + rightmost); } this.locked = false; ]]>