0) && (h > 0); if (vis) { if (this.doanimation) { if (!s.visible) { if (s.x != x) s.setX(x); if (s.y != y) s.setY(y); if (s.width != w) s.setWidth(w); if (s.height != h) s.setHeight(h); // To speed up the process only the currently visible // views are animated, while the hidden views are // given there final dimensions and then popped into view // at the end of the animations. called by the 'delayvisDL' // delegate. s.update_vis_later = true; } else { var anm; if (s.x != x) anm = s.animate('x',x,this.duration,false); if (s.y != y) anm = s.animate('y',y,this.duration,false); if (s.width != w) anm = s.animate('width',w,this.duration,false); if (s.height != h) anm = s.animate('height',h,this.duration,false); didAnimation=true; this.delayvisDL.register(anm,'onstop'); } } else { if (s.x != x) s.setX(x); if (s.y != y) s.setY(y); if (s.width != w) s.setWidth(w); if (s.height != h) s.setHeight(h); if (!s.visible) s.setVisible(true); } } else { if (rowi ==0) { // move the top row even though its invisible so that the // headers for the day of week (which are constrained to the // top row) move correctly. only need width and x info. if (this.doanimation) { if (s.x != x) s.animate('x',x,this.duration,false); if (s.width != w) s.animate('width',w,this.duration,false); } else { if (s.x != x) s.setX(x); if (s.width != w) s.setWidth(w); } } if (s.visible) s.setVisible(false); s.update_vis_later = false; } i++; //increment index counter if (i >= this.subviews.length) { break; } x += w + wspace; // increment the x value for the next subview in this row } if (i >= this.subviews.length) { break; } y += h + hspace; } // Check to see if we need the last row, and if not hide these days if (nrows == 5) { // hide last row for (var c = 35; c < 42; c++) { this.subviews[c].setVisible(false); this.subviews[c].update_vis_later = false; } } if (!didAnimation) this.resetVisibility(); ]]> if ( ! this[ 'positiondel' ] ){ this.positiondel = new LzDelegate( this , "checkMousePosition" ); } this.positiondel.register( LzIdle , "onidle" ); this.positiondel.unregisterAll( ); if ( lastsel != null ){ lastsel.hilite(false); lastsel.acceptDrop(); } else { //cancel drop } parent.width || y < 0 || y > parent.height ) { s = null; }else if ( this.openrow_only ){ //grid special condition if ( this.opencol_only ){ //in day only view s = this.subviews[ this.cols * openrow + opencol ]; } else { //in week view var newcol = Math.floor( x/ (cellwidth + spacing ) ); if ( opencol != -1 && newcol > opencol ){ var rightedge = ( opencol * ( spacing + cellwidth ) )+ cw + addedOpenWidth; if ( x < rightedge ) { newcol = opencol; } else { newcol = opencol + 1 + Math.floor( ( x - rightedge ) / (cellwidth + spacing ) ); } } s = this.subviews[ this.cols * displayrow + newcol ]; } } else { var newcol = Math.floor( x/ (cellwidth + spacing ) ); if ( opencol != -1 && newcol > opencol ){ var rightedge = ( opencol * ( spacing + cellwidth ) )+ cw + addedOpenWidth; if ( x < rightedge ) { newcol = opencol; } else { newcol = opencol + 1 + Math.floor( ( x - rightedge ) / (cellwidth + spacing ) ); } } //this doesn't find the case where the mouse is over the spacing between cells var newrow = Math.floor( y/ (cellheight + spacing ) ); if ( openrow != -1 && newrow > openrow ){ var bottom = ( openrow * ( spacing + cellheight ) )+ cw + addedOpenHeight; if ( y < bottom ) { newrow = openrow; } else { newrow = openrow + 1 + Math.floor( ( y - bottom ) / (cellheight + spacing ) ); } } s = this.subviews[ this.cols * newrow + newcol ]; } if( s != this['lastsel'] ){ if (this['lastsel'] != null ){ lastsel.hilite(false); } this.lastsel = s; // update the hilite if (lastsel != null){ lastsel.hilite(true); } } ]]>