@@ -265,16 +265,16 @@ test("position, default center on window", function() {
265
265
var el = $ ( '<div></div>' ) . dialog ( ) ;
266
266
var dialog = el . dialog ( 'widget' ) ;
267
267
var offset = dialog . offset ( ) ;
268
- same ( offset . left , Math . floor ( $ ( window ) . width ( ) / 2 - dialog . outerWidth ( ) / 2 ) + $ ( window ) . scrollLeft ( ) ) ;
269
- same ( offset . top , Math . floor ( $ ( window ) . height ( ) / 2 - dialog . outerHeight ( ) / 2 ) + $ ( window ) . scrollTop ( ) ) ;
268
+ same ( offset . left , Math . round ( $ ( window ) . width ( ) / 2 - dialog . outerWidth ( ) / 2 ) + $ ( window ) . scrollLeft ( ) ) ;
269
+ same ( offset . top , Math . round ( $ ( window ) . height ( ) / 2 - dialog . outerHeight ( ) / 2 ) + $ ( window ) . scrollTop ( ) ) ;
270
270
el . remove ( ) ;
271
271
} ) ;
272
272
273
273
test ( "position, top on window" , function ( ) {
274
274
var el = $ ( '<div></div>' ) . dialog ( { position : "top" } ) ;
275
275
var dialog = el . dialog ( 'widget' ) ;
276
276
var offset = dialog . offset ( ) ;
277
- same ( offset . left , Math . floor ( $ ( window ) . width ( ) / 2 - dialog . outerWidth ( ) / 2 ) + $ ( window ) . scrollLeft ( ) ) ;
277
+ same ( offset . left , Math . round ( $ ( window ) . width ( ) / 2 - dialog . outerWidth ( ) / 2 ) + $ ( window ) . scrollLeft ( ) ) ;
278
278
same ( offset . top , $ ( window ) . scrollTop ( ) ) ;
279
279
el . remove ( ) ;
280
280
} ) ;
@@ -284,7 +284,7 @@ test("position, left on window", function() {
284
284
var dialog = el . dialog ( 'widget' ) ;
285
285
var offset = dialog . offset ( ) ;
286
286
same ( offset . left , 0 ) ;
287
- same ( offset . top , Math . floor ( $ ( window ) . height ( ) / 2 - dialog . outerHeight ( ) / 2 ) + $ ( window ) . scrollTop ( ) ) ;
287
+ same ( offset . top , Math . round ( $ ( window ) . height ( ) / 2 - dialog . outerHeight ( ) / 2 ) + $ ( window ) . scrollTop ( ) ) ;
288
288
el . remove ( ) ;
289
289
} ) ;
290
290
0 commit comments