Skip to content
This repository
Browse code

Popup: fixed the order of the tolerance parameters. Fixes #4856 - Pop…

…up tolerance parameters in different order than documentation.
  • Loading branch information...
commit 2464e88fce04e532f92687fc5cb85ed6994077c1 1 parent 3659d20
Jasper de Groot authored August 27, 2012

Showing 1 changed file with 10 additions and 10 deletions. Show diff stats Hide diff stats

  1. 20  js/widgets/popup.js
20  js/widgets/popup.js
@@ -267,27 +267,27 @@ define( [ "jquery",
267 267
 
268 268
 					// The first value denotes top/bottom tolerance, and the second value denotes left/right tolerance
269 269
 					case 2:
270  
-						if ( !isNaN( ar[ 1 ] ) ) {
271  
-							tol.t = tol.b = ar[ 1 ];
272  
-						}
273 270
 						if ( !isNaN( ar[ 0 ] ) ) {
274  
-							tol.l = tol.r = ar[ 0 ];
  271
+							tol.t = tol.b = ar[ 0 ];
  272
+						}
  273
+						if ( !isNaN( ar[ 1 ] ) ) {
  274
+							tol.l = tol.r = ar[ 1 ];
275 275
 						}
276 276
 						break;
277 277
 
278 278
 					// The array contains values in the order top, right, bottom, left
279 279
 					case 4:
  280
+						if ( !isNaN( ar[ 0 ] ) ) {
  281
+							tol.t = ar[ 0 ];
  282
+						}
280 283
 						if ( !isNaN( ar[ 1 ] ) ) {
281  
-							tol.t = ar[ 1 ];
  284
+							tol.r = ar[ 1 ];
282 285
 						}
283 286
 						if ( !isNaN( ar[ 2 ] ) ) {
284  
-							tol.r = ar[ 2 ];
  287
+							tol.b = ar[ 2 ];
285 288
 						}
286 289
 						if ( !isNaN( ar[ 3 ] ) ) {
287  
-							tol.b = ar[ 3 ];
288  
-						}
289  
-						if ( !isNaN( ar[ 0 ] ) ) {
290  
-							tol.l = ar[ 0 ];
  290
+							tol.l = ar[ 3 ];
291 291
 						}
292 292
 						break;
293 293
 

0 notes on commit 2464e88

Please sign in to comment.
Something went wrong with that request. Please try again.