@@ -45,7 +45,7 @@ describe('ui.grid.resizeColumns', function () {
45
45
grid = angular . element ( '<div style="width: 500px; height: 300px" ui-grid="gridOpts" ui-grid-resize-columns></div>' ) ;
46
46
document . body . appendChild ( grid [ 0 ] ) ;
47
47
$compile ( grid ) ( $scope ) ;
48
- $scope . $digest ( ) ;
48
+ $scope . $apply ( ) ;
49
49
gridScope = $ ( grid ) . isolateScope ( ) ;
50
50
} ;
51
51
@@ -138,7 +138,7 @@ describe('ui.grid.resizeColumns', function () {
138
138
139
139
firstResizer . trigger ( 'dblclick' ) ;
140
140
141
- $scope . $digest ( ) ;
141
+ $scope . $apply ( ) ;
142
142
143
143
var newColWidth = $ ( grid ) . find ( '.' + uiGridConstants . COL_CLASS_PREFIX + '0' ) . first ( ) . width ( ) ;
144
144
@@ -152,7 +152,7 @@ describe('ui.grid.resizeColumns', function () {
152
152
var firstResizer = $ ( grid ) . find ( '[ui-grid-column-resizer]' ) . first ( ) ;
153
153
154
154
firstResizer . trigger ( downEvent ) ;
155
- $scope . $digest ( ) ;
155
+ $scope . $apply ( ) ;
156
156
157
157
var overlay = $ ( grid ) . find ( '.ui-grid-resize-overlay' ) ;
158
158
@@ -175,15 +175,15 @@ describe('ui.grid.resizeColumns', function () {
175
175
initialX = firstResizer . position ( ) . left ;
176
176
177
177
$ ( firstResizer ) . simulate ( downEvent , { clientX : initialX } ) ;
178
- $scope . $digest ( ) ;
178
+ $scope . $apply ( ) ;
179
179
180
180
// Get the overlay
181
181
overlay = $ ( grid ) . find ( '.ui-grid-resize-overlay' ) ;
182
182
initialOverlayX = $ ( overlay ) . position ( ) . left ;
183
183
184
184
xDiff = 100 ;
185
185
$ ( document ) . simulate ( moveEvent , { clientX : initialX + xDiff } ) ;
186
- $scope . $digest ( ) ;
186
+ $scope . $apply ( ) ;
187
187
} ) ;
188
188
189
189
it ( 'should add the column-resizing class to the grid' , function ( ) {
@@ -205,7 +205,7 @@ describe('ui.grid.resizeColumns', function () {
205
205
describe ( 'then releasing the mouse' , function ( ) {
206
206
beforeEach ( function ( ) {
207
207
$ ( document ) . simulate ( upEvent , { clientX : initialX + xDiff } ) ;
208
- $scope . $digest ( ) ;
208
+ $scope . $apply ( ) ;
209
209
} ) ;
210
210
211
211
it ( 'should cause the column to resize by the amount change in the X axis' , function ( ) {
@@ -261,10 +261,10 @@ describe('ui.grid.resizeColumns', function () {
261
261
initialX = firstResizer . position ( ) . left ;
262
262
263
263
$ ( firstResizer ) . simulate ( downEvent , { clientX : initialX } ) ;
264
- $scope . $digest ( ) ;
264
+ $scope . $apply ( ) ;
265
265
266
266
$ ( document ) . simulate ( upEvent , { clientX : initialX - minWidth } ) ;
267
- $scope . $digest ( ) ;
267
+ $scope . $apply ( ) ;
268
268
} ) ;
269
269
270
270
it ( 'should not go below the minWidth less border' , function ( ) {
@@ -299,7 +299,7 @@ describe('ui.grid.resizeColumns', function () {
299
299
var firstResizer = $ ( grid ) . find ( '[ui-grid-column-resizer]' ) . first ( ) ;
300
300
301
301
$ ( firstResizer ) . simulate ( 'dblclick' ) ;
302
- $scope . $digest ( ) ;
302
+ $scope . $apply ( ) ;
303
303
304
304
var firstColumnUid = gridScope . grid . columns [ 0 ] . uid ;
305
305
@@ -317,10 +317,10 @@ describe('ui.grid.resizeColumns', function () {
317
317
initialX = firstResizer . position ( ) . left ;
318
318
319
319
$ ( firstResizer ) . simulate ( downEvent , { clientX : initialX } ) ;
320
- $scope . $digest ( ) ;
320
+ $scope . $apply ( ) ;
321
321
322
322
$ ( document ) . simulate ( upEvent , { clientX : initialX + maxWidth } ) ;
323
- $scope . $digest ( ) ;
323
+ $scope . $apply ( ) ;
324
324
} ) ;
325
325
326
326
it ( 'should not go above the maxWidth' , function ( ) {
0 commit comments