Changeset 35
- Timestamp:
- 11/01/08 23:19:34 (4 years ago)
- google:author:
- tsuckowhomberg
- Location:
- trunk
- Files:
-
- 3 modified
-
CHANGELOG (modified) (1 diff)
-
src/EditorGridPanel.js (modified) (1 diff)
-
src/GridView.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/CHANGELOG
r33 r35 1 Version 0.3a3 (GPL) 1 Version 0.3a4 (GPL) 2 1-November-2008 3 4 - fixed: (EditorGridPanel.js) call to "startEditing()" would throw error if the 5 requested index in the view is not currently representing a record; overrode 6 method for checking if record to edit is available 7 - enhancement: (GridView.js) adjusted behavior of "ensureVisible()" to scroll a 8 requested cell horizontally into view 9 10 Version 0.3a3 (GPL) 2 11 1-November-2008 3 12 -
trunk/src/EditorGridPanel.js
r31 r35 50 50 51 51 /** 52 * Starts editing the specified for the specified row/column 53 * Will be cancelled if the requested row index to edit is not 54 * represented by data due to out of range regarding the view's 55 * store buffer. 56 * 57 * @param {Number} rowIndex 58 * @param {Number} colIndex 59 */ 60 startEditing : function(row, col) 61 { 62 this.stopEditing(); 63 if(this.colModel.isCellEditable(col, row)){ 64 this.view.ensureVisible(row, col, true); 65 if (!this.store.getAt(row)) { 66 return; 67 } 68 } 69 70 return Ext.ux.grid.livegrid.EditorGridPanel.superclass.startEditing.call(this, row, col); 71 }, 72 73 /** 52 74 * Since we do not have multiple inheritance, we need to override the 53 75 * same methods in this class we have overriden for -
trunk/src/GridView.js
r31 r35 1158 1158 { 1159 1159 var xy = this.ensureVisible(row, col, hscroll); 1160 1160 1161 if (!xy) { 1161 1162 return; 1162 1163 } 1164 1163 1165 this.focusEl.setXY(xy); 1164 1166 … … 1202 1204 var rowEl = this.getRow(row), cellEl; 1203 1205 1206 if(!rowEl){ 1207 return; 1208 } 1209 1204 1210 if(!(hscroll === false && col === 0)){ 1205 1211 while(this.cm.isHidden(col)){ … … 1209 1215 } 1210 1216 1211 if(!rowEl){1212 return;1213 }1214 1215 1217 var c = this.scroller.dom; 1218 1219 if(hscroll !== false){ 1220 var cleft = parseInt(cellEl.offsetLeft, 10); 1221 var cright = cleft + cellEl.offsetWidth; 1222 1223 var sleft = parseInt(c.scrollLeft, 10); 1224 var sright = sleft + c.clientWidth; 1225 if(cleft < sleft){ 1226 c.scrollLeft = cleft; 1227 }else if(cright > sright){ 1228 c.scrollLeft = cright-c.clientWidth; 1229 } 1230 } 1231 1216 1232 1217 1233 return cellEl ?
