|
From: Thyamad c. <th...@us...> - 2006-01-16 03:36:47
|
Update of /cvsroot/thyapi/thyapi/thywidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14567/thywidgets Modified Files: thywindow.js Log Message: Commiting file additions and modification from SVN revision 2635 to 2636... Changes made by vinicius on 2006-01-16 05:39:15 +0100 (Mon, 16 Jan 2006) corresponding to SVN revision 2636 with message: window now cannot go out of the screen Index: thywindow.js =================================================================== RCS file: /cvsroot/thyapi/thyapi/thywidgets/thywindow.js,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** thywindow.js 16 Jan 2006 03:31:19 -0000 1.7 --- thywindow.js 16 Jan 2006 03:36:40 -0000 1.8 *************** *** 200,220 **** { var pos = thyWindow._getWindowPosition(self); ! if (pos.x < 0) ! { ! self.setX(0); ! } ! else ! { ! self.setX(pos.x); ! } ! ! if (pos.y < 0) ! { ! self.setY(0); ! } ! else ! { ! self.setY(pos.y); ! } }; --- 200,205 ---- { var pos = thyWindow._getWindowPosition(self); ! self.setX(pos.x); ! self.setY(pos.y); }; *************** *** 336,340 **** '<tr><td id="'+this.name+'_l'+'" class="'+this.getCSSClasses('left')+'"></td>', '<td id="'+this.name+'_contentHolder" class="'+this.getCSSClasses('window')+'">', ! // style="position: relative">'+this._thyBorderPanelGetInnerHTML(), '<div style="position: relative; width: 100%; height: 100%">'+this._thyPanelGetInnerHTML()+'</div>', '</td>', --- 321,325 ---- '<tr><td id="'+this.name+'_l'+'" class="'+this.getCSSClasses('left')+'"></td>', '<td id="'+this.name+'_contentHolder" class="'+this.getCSSClasses('window')+'">', ! /* style="position: relative">'+this._thyBorderPanelGetInnerHTML(), */ '<div style="position: relative; width: 100%; height: 100%">'+this._thyPanelGetInnerHTML()+'</div>', '</td>', *************** *** 452,455 **** --- 437,443 ---- positions_y[thyWin.name][y] = y; + if (x<0) x=0; + if (y<0) y=0; + return {x:x,y:y}; } *************** *** 549,554 **** { this.winDragBorder.setDisplay(true); ! this.setX(this.winDragBorder.getAbsoluteX()); ! this.setY(this.winDragBorder.getAbsoluteY()); this.winDragBorder.setDisplay(false); this.setDisplay(true); --- 537,544 ---- { this.winDragBorder.setDisplay(true); ! var absx = this.winDragBorder.getAbsoluteX(); ! var absy = this.winDragBorder.getAbsoluteY(); ! this.setX((absx<0)?0:absx); ! this.setY((absy<0)?0:absy); this.winDragBorder.setDisplay(false); this.setDisplay(true); |