|
22 | 22 | var GridApi = function GridApi(grid) {
|
23 | 23 | this.grid = grid;
|
24 | 24 | this.listeners = [];
|
25 |
| - |
| 25 | + |
26 | 26 | /**
|
27 | 27 | * @ngdoc function
|
28 | 28 | * @name renderingComplete
|
|
31 | 31 | * time as `onRegisterApi`, but provides a way to obtain
|
32 | 32 | * that same event within features without stopping end
|
33 | 33 | * users from getting at the onRegisterApi method.
|
34 |
| - * |
| 34 | + * |
35 | 35 | * Included in gridApi so that it's always there - otherwise
|
36 | 36 | * there is still a timing problem with when a feature can
|
37 |
| - * call this. |
38 |
| - * |
39 |
| - * @param {GridApi} gridApi the grid api, as normally |
| 37 | + * call this. |
| 38 | + * |
| 39 | + * @param {GridApi} gridApi the grid api, as normally |
40 | 40 | * returned in the onRegisterApi method
|
41 |
| - * |
| 41 | + * |
42 | 42 | * @example
|
43 | 43 | * <pre>
|
44 | 44 | * gridApi.core.on.renderingComplete( grid );
|
|
52 | 52 | * @eventOf ui.grid.core.api:PublicApi
|
53 | 53 | * @description is raised after the filter is changed. The nature
|
54 | 54 | * of the watch expression doesn't allow notification of what changed,
|
55 |
| - * so the receiver of this event will need to re-extract the filter |
| 55 | + * so the receiver of this event will need to re-extract the filter |
56 | 56 | * conditions from the columns.
|
57 |
| - * |
| 57 | + * |
58 | 58 | */
|
59 | 59 | this.registerEvent( 'core', 'filterChanged' );
|
60 | 60 |
|
|
63 | 63 | * @name setRowInvisible
|
64 | 64 | * @methodOf ui.grid.core.api:PublicApi
|
65 | 65 | * @description Sets an override on the row to make it always invisible,
|
66 |
| - * which will override any filtering or other visibility calculations. |
| 66 | + * which will override any filtering or other visibility calculations. |
67 | 67 | * If the row is currently visible then sets it to invisible and calls
|
68 | 68 | * both grid refresh and emits the rowsVisibleChanged event
|
69 | 69 | * @param {object} rowEntity gridOptions.data[] array instance
|
70 | 70 | */
|
71 | 71 | this.registerMethod( 'core', 'setRowInvisible', GridRow.prototype.setRowInvisible );
|
72 |
| - |
| 72 | + |
73 | 73 | /**
|
74 | 74 | * @ngdoc function
|
75 | 75 | * @name clearRowInvisible
|
76 | 76 | * @methodOf ui.grid.core.api:PublicApi
|
77 |
| - * @description Clears any override on visibility for the row so that it returns to |
78 |
| - * using normal filtering and other visibility calculations. |
| 77 | + * @description Clears any override on visibility for the row so that it returns to |
| 78 | + * using normal filtering and other visibility calculations. |
79 | 79 | * If the row is currently invisible then sets it to visible and calls
|
80 | 80 | * both grid refresh and emits the rowsVisibleChanged event
|
81 | 81 | * TODO: if a filter is active then we can't just set it to visible?
|
82 | 82 | * @param {object} rowEntity gridOptions.data[] array instance
|
83 | 83 | */
|
84 | 84 | this.registerMethod( 'core', 'clearRowInvisible', GridRow.prototype.clearRowInvisible );
|
85 |
| - |
| 85 | + |
86 | 86 | /**
|
87 | 87 | * @ngdoc function
|
88 | 88 | * @name getVisibleRows
|
|
92 | 92 | * @returns {array} an array of gridRow
|
93 | 93 | */
|
94 | 94 | this.registerMethod( 'core', 'getVisibleRows', this.grid.getVisibleRows );
|
95 |
| - |
| 95 | + |
96 | 96 | /**
|
97 | 97 | * @ngdoc event
|
98 | 98 | * @name rowsVisibleChanged
|
|
142 | 142 | * arguments: oldHeight, newHeight
|
143 | 143 | */
|
144 | 144 | this.registerEvent( 'core', 'canvasHeightChanged');
|
| 145 | + |
| 146 | + /** |
| 147 | + * @ngdoc event |
| 148 | + * @name gridDimensionChanged |
| 149 | + * @eventOf ui.grid.core.api:PublicApi |
| 150 | + * @description is raised when the grid dimensions have changed (when autoResize is on) |
| 151 | + * <br/> |
| 152 | + * arguments: oldGridHeight, oldGridWidth, newGridHeight, newGridWidth |
| 153 | + */ |
| 154 | + this.registerEvent( 'core', 'gridDimensionChanged'); |
145 | 155 | };
|
146 | 156 |
|
147 | 157 | /**
|
|
365 | 375 | });
|
366 | 376 |
|
367 | 377 | };
|
368 |
| - |
| 378 | + |
369 | 379 | return GridApi;
|
370 | 380 |
|
371 | 381 | }]);
|
|
0 commit comments