Upgrade to ExtJS 3.1.0 - Released 12/16/2009
[extjs.git] / pkgs / pkg-tips-debug.js
index f9bc827..a4c100f 100644 (file)
@@ -1,5 +1,5 @@
 /*!
- * Ext JS Library 3.0.3
+ * Ext JS Library 3.1.0
  * Copyright(c) 2006-2009 Ext JS, LLC
  * licensing@extjs.com
  * http://www.extjs.com/license
@@ -94,12 +94,13 @@ tip.showAt([50,100]);
     },\r
 \r
     // protected\r
-    doAutoWidth : function(){\r
+    doAutoWidth : function(adjust){\r
+        adjust = adjust || 0;\r
         var bw = this.body.getTextWidth();\r
         if(this.title){\r
             bw = Math.max(bw, this.header.child('span').getTextWidth(this.title));\r
         }\r
-        bw += this.getFrameWidth() + (this.closable ? 20 : 0) + this.body.getPadding("lr");\r
+        bw += this.getFrameWidth() + (this.closable ? 20 : 0) + this.body.getPadding("lr") + adjust;\r
         this.setWidth(bw.constrain(this.minWidth, this.maxWidth));\r
         \r
         // IE7 repaint bug on initial show\r
@@ -342,18 +343,17 @@ myGrid.on('render', function(grid) {
         }\r
         if(this.anchor){\r
             this.targetCounter++;\r
-            var offsets = this.getOffsets();\r
-            var xy = (this.anchorToTarget && !this.trackMouse) ?\r
-                this.el.getAlignToXY(this.anchorTarget, this.getAnchorAlign()) :\r
-                this.targetXY;\r
-\r
-            var dw = Ext.lib.Dom.getViewWidth()-5;\r
-            var dh = Ext.lib.Dom.getViewHeight()-5;\r
-            var scrollX = (document.documentElement.scrollLeft || document.body.scrollLeft || 0)+5;\r
-            var scrollY = (document.documentElement.scrollTop || document.body.scrollTop || 0)+5;\r
-\r
-            var axy = [xy[0] + offsets[0], xy[1] + offsets[1]];\r
-            var sz = this.getSize();\r
+            var offsets = this.getOffsets(),\r
+                xy = (this.anchorToTarget && !this.trackMouse) ? this.el.getAlignToXY(this.anchorTarget, this.getAnchorAlign()) : this.targetXY,\r
+                dw = Ext.lib.Dom.getViewWidth() - 5,\r
+                dh = Ext.lib.Dom.getViewHeight() - 5,\r
+                de = document.documentElement,\r
+                bd = document.body,\r
+                scrollX = (de.scrollLeft || bd.scrollLeft || 0) + 5,\r
+                scrollY = (de.scrollTop || bd.scrollTop || 0) + 5,\r
+                axy = [xy[0] + offsets[0], xy[1] + offsets[1]]\r
+                sz = this.getSize();\r
+                \r
             this.anchorEl.removeClass(this.anchorCls);\r
 \r
             if(this.targetCounter < 2){\r
@@ -442,7 +442,8 @@ myGrid.on('render', function(grid) {
 \r
     // private\r
     getOffsets : function(){\r
-        var offsets, ap = this.getAnchorPosition().charAt(0);\r
+        var offsets, \r
+            ap = this.getAnchorPosition().charAt(0);\r
         if(this.anchorToTarget && !this.trackMouse){\r
             switch(ap){\r
                 case 't':\r
@@ -662,6 +663,16 @@ myGrid.on('render', function(grid) {
         }\r
         return {x : x, y: y};\r
     },\r
+    \r
+    beforeDestroy : function(){\r
+        this.clearTimers();\r
+        Ext.destroy(this.anchorEl);\r
+        delete this.anchorEl;\r
+        delete this.target;\r
+        delete this.anchorTarget;\r
+        delete this.triggerElement;\r
+        Ext.ToolTip.superclass.beforeDestroy.call(this);    \r
+    },\r
 \r
     // private\r
     onDestroy : function(){\r
@@ -762,13 +773,12 @@ Ext.QuickTip = Ext.extend(Ext.ToolTip, {
             this.clearTimer('show');\r
         }\r
     },\r
-\r
-    // private\r
+    \r
     getTipCfg: function(e) {\r
         var t = e.getTarget(), \r
             ttp, \r
             cfg;\r
-        if(this.interceptTitles && t.title){\r
+        if(this.interceptTitles && t.title && Ext.isString(t.title)){\r
             ttp = t.title;\r
             t.qtip = ttp;\r
             t.removeAttribute("title");\r