XObject.js
authorAlan Knowles <alan@akbkhome.com>
Thu, 27 May 2010 09:56:40 +0000 (17:56 +0800)
committerAlan Knowles <alan@akbkhome.com>
Thu, 27 May 2010 09:56:40 +0000 (17:56 +0800)
XObject.js

index c75fdb2..92d8a38 100644 (file)
@@ -220,8 +220,11 @@ XObject.prototype = {
                 var c = n % _this.config.n_columns;
                 var r = Math.floor(n/_this.config.n_columns);
                 i.pack = [ 'attach', c, c+1, r, r+1, 
-                        i.x_options || 5, i.x_padding || 0,
-                        i.y_options || 5, i.y_padding || 0
+                        typeof(i.x_options) == 'undefined' ?  5 : i.x_options,
+                        typeof(i.y_options) == 'undefined' ?  5 : i.y_options,
+                        typeof(i.x_padding) == 'undefined' ?  0 : i.x_padding,
+                        typeof(i.x_padding) == 'undefined' ?  1 : i.x_padding,
+                       
                 ]
             }