Upgrade to ExtJS 3.1.0 - Released 12/16/2009
[extjs.git] / docs / source / ToolTip.html
index 3e30671..2f45fd9 100644 (file)
@@ -1,17 +1,12 @@
-<html>
-<head>
-  <title>The source code</title>
-    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
-    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
-</head>
-<body  onload="prettyPrint();">
-    <pre class="prettyprint lang-js">/*!
- * Ext JS Library 3.0.3
- * Copyright(c) 2006-2009 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
-<div id="cls-Ext.ToolTip"></div>/**\r
+<html>\r
+<head>\r
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />    \r
+  <title>The source code</title>\r
+    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
+    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
+</head>\r
+<body  onload="prettyPrint();">\r
+    <pre class="prettyprint lang-js"><div id="cls-Ext.ToolTip"></div>/**\r
  * @class Ext.ToolTip\r
  * @extends Ext.Tip\r
  * A standard tooltip implementation for providing additional information when hovering over a target element.\r
@@ -196,18 +191,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
@@ -296,7 +290,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
@@ -516,6 +511,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
@@ -524,6 +529,6 @@ myGrid.on('render', function(grid) {
     }\r
 });\r
 \r
-Ext.reg('tooltip', Ext.ToolTip);</pre>
-</body>
+Ext.reg('tooltip', Ext.ToolTip);</pre>    \r
+</body>\r
 </html>
\ No newline at end of file