You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

552 lines
20 KiB

2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>The source code</title>
  6. <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
  7. <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
  8. <style type="text/css">
  9. .highlight { display: block; background-color: #ddd; }
  10. </style>
  11. <script type="text/javascript">
  12. function highlight() {
  13. document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
  14. }
  15. </script>
  16. </head>
  17. <body onload="prettyPrint(); highlight();">
  18. <pre class="prettyprint lang-js"><span id='Ext-ToolTip-method-constructor'><span id='Ext-ToolTip'>/**
  19. </span></span> * @class Ext.ToolTip
  20. * @extends Ext.Tip
  21. * A standard tooltip implementation for providing additional information when hovering over a target element.
  22. * @xtype tooltip
  23. * @constructor
  24. * Create a new Tooltip
  25. * @param {Object} config The configuration options
  26. */
  27. Ext.ToolTip = Ext.extend(Ext.Tip, {
  28. <span id='Ext-ToolTip-property-triggerElement'> /**
  29. </span> * When a Tooltip is configured with the &lt;code&gt;{@link #delegate}&lt;/code&gt;
  30. * option to cause selected child elements of the &lt;code&gt;{@link #target}&lt;/code&gt;
  31. * Element to each trigger a seperate show event, this property is set to
  32. * the DOM element which triggered the show.
  33. * @type DOMElement
  34. * @property triggerElement
  35. */
  36. <span id='Ext-ToolTip-cfg-target'> /**
  37. </span> * @cfg {Mixed} target The target HTMLElement, Ext.Element or id to monitor
  38. * for mouseover events to trigger showing this ToolTip.
  39. */
  40. <span id='Ext-ToolTip-cfg-autoHide'> /**
  41. </span> * @cfg {Boolean} autoHide True to automatically hide the tooltip after the
  42. * mouse exits the target element or after the &lt;code&gt;{@link #dismissDelay}&lt;/code&gt;
  43. * has expired if set (defaults to true). If &lt;code&gt;{@link closable} = true&lt;/code&gt;
  44. * a close tool button will be rendered into the tooltip header.
  45. */
  46. <span id='Ext-ToolTip-cfg-showDelay'> /**
  47. </span> * @cfg {Number} showDelay Delay in milliseconds before the tooltip displays
  48. * after the mouse enters the target element (defaults to 500)
  49. */
  50. showDelay : 500,
  51. <span id='Ext-ToolTip-cfg-hideDelay'> /**
  52. </span> * @cfg {Number} hideDelay Delay in milliseconds after the mouse exits the
  53. * target element but before the tooltip actually hides (defaults to 200).
  54. * Set to 0 for the tooltip to hide immediately.
  55. */
  56. hideDelay : 200,
  57. <span id='Ext-ToolTip-cfg-dismissDelay'> /**
  58. </span> * @cfg {Number} dismissDelay Delay in milliseconds before the tooltip
  59. * automatically hides (defaults to 5000). To disable automatic hiding, set
  60. * dismissDelay = 0.
  61. */
  62. dismissDelay : 5000,
  63. <span id='Ext-ToolTip-cfg-mouseOffset'> /**
  64. </span> * @cfg {Array} mouseOffset An XY offset from the mouse position where the
  65. * tooltip should be shown (defaults to [15,18]).
  66. */
  67. <span id='Ext-ToolTip-cfg-trackMouse'> /**
  68. </span> * @cfg {Boolean} trackMouse True to have the tooltip follow the mouse as it
  69. * moves over the target element (defaults to false).
  70. */
  71. trackMouse : false,
  72. <span id='Ext-ToolTip-cfg-anchorToTarget'> /**
  73. </span> * @cfg {Boolean} anchorToTarget True to anchor the tooltip to the target
  74. * element, false to anchor it relative to the mouse coordinates (defaults
  75. * to true). When &lt;code&gt;anchorToTarget&lt;/code&gt; is true, use
  76. * &lt;code&gt;{@link #defaultAlign}&lt;/code&gt; to control tooltip alignment to the
  77. * target element. When &lt;code&gt;anchorToTarget&lt;/code&gt; is false, use
  78. * &lt;code&gt;{@link #anchorPosition}&lt;/code&gt; instead to control alignment.
  79. */
  80. anchorToTarget : true,
  81. <span id='Ext-ToolTip-cfg-anchorOffset'> /**
  82. </span> * @cfg {Number} anchorOffset A numeric pixel value used to offset the
  83. * default position of the anchor arrow (defaults to 0). When the anchor
  84. * position is on the top or bottom of the tooltip, &lt;code&gt;anchorOffset&lt;/code&gt;
  85. * will be used as a horizontal offset. Likewise, when the anchor position
  86. * is on the left or right side, &lt;code&gt;anchorOffset&lt;/code&gt; will be used as
  87. * a vertical offset.
  88. */
  89. anchorOffset : 0,
  90. <span id='Ext-ToolTip-cfg-delegate'> /**
  91. </span> * @cfg {String} delegate &lt;p&gt;Optional. A {@link Ext.DomQuery DomQuery}
  92. * selector which allows selection of individual elements within the
  93. * &lt;code&gt;{@link #target}&lt;/code&gt; element to trigger showing and hiding the
  94. * ToolTip as the mouse moves within the target.&lt;/p&gt;
  95. * &lt;p&gt;When specified, the child element of the target which caused a show
  96. * event is placed into the &lt;code&gt;{@link #triggerElement}&lt;/code&gt; property
  97. * before the ToolTip is shown.&lt;/p&gt;
  98. * &lt;p&gt;This may be useful when a Component has regular, repeating elements
  99. * in it, each of which need a Tooltip which contains information specific
  100. * to that element. For example:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;
  101. var myGrid = new Ext.grid.gridPanel(gridConfig);
  102. myGrid.on('render', function(grid) {
  103. var store = grid.getStore(); // Capture the Store.
  104. var view = grid.getView(); // Capture the GridView.
  105. myGrid.tip = new Ext.ToolTip({
  106. target: view.mainBody, // The overall target element.
  107. delegate: '.x-grid3-row', // Each grid row causes its own seperate show and hide.
  108. trackMouse: true, // Moving within the row should not hide the tip.
  109. renderTo: document.body, // Render immediately so that tip.body can be
  110. // referenced prior to the first show.
  111. listeners: { // Change content dynamically depending on which element
  112. // triggered the show.
  113. beforeshow: function updateTipBody(tip) {
  114. var rowIndex = view.findRowIndex(tip.triggerElement);
  115. tip.body.dom.innerHTML = 'Over Record ID ' + store.getAt(rowIndex).id;
  116. }
  117. }
  118. });
  119. });
  120. *&lt;/code&gt;&lt;/pre&gt;
  121. */
  122. <span id='Ext-ToolTip-property-targetCounter'> // private
  123. </span> targetCounter : 0,
  124. <span id='Ext-ToolTip-property-constrainPosition'> constrainPosition : false,
  125. </span>
  126. <span id='Ext-ToolTip-method-initComponent'> // private
  127. </span> initComponent : function(){
  128. Ext.ToolTip.superclass.initComponent.call(this);
  129. this.lastActive = new Date();
  130. this.initTarget(this.target);
  131. this.origAnchor = this.anchor;
  132. },
  133. <span id='Ext-ToolTip-method-onRender'> // private
  134. </span> onRender : function(ct, position){
  135. Ext.ToolTip.superclass.onRender.call(this, ct, position);
  136. this.anchorCls = 'x-tip-anchor-' + this.getAnchorPosition();
  137. this.anchorEl = this.el.createChild({
  138. cls: 'x-tip-anchor ' + this.anchorCls
  139. });
  140. },
  141. <span id='Ext-ToolTip-method-afterRender'> // private
  142. </span> afterRender : function(){
  143. Ext.ToolTip.superclass.afterRender.call(this);
  144. this.anchorEl.setStyle('z-index', this.el.getZIndex() + 1).setVisibilityMode(Ext.Element.DISPLAY);
  145. },
  146. <span id='Ext-ToolTip-method-initTarget'> /**
  147. </span> * Binds this ToolTip to the specified element. The tooltip will be displayed when the mouse moves over the element.
  148. * @param {Mixed} t The Element, HtmlElement, or ID of an element to bind to
  149. */
  150. initTarget : function(target){
  151. var t;
  152. if((t = Ext.get(target))){
  153. if(this.target){
  154. var tg = Ext.get(this.target);
  155. this.mun(tg, 'mouseover', this.onTargetOver, this);
  156. this.mun(tg, 'mouseout', this.onTargetOut, this);
  157. this.mun(tg, 'mousemove', this.onMouseMove, this);
  158. }
  159. this.mon(t, {
  160. mouseover: this.onTargetOver,
  161. mouseout: this.onTargetOut,
  162. mousemove: this.onMouseMove,
  163. scope: this
  164. });
  165. this.target = t;
  166. }
  167. if(this.anchor){
  168. this.anchorTarget = this.target;
  169. }
  170. },
  171. <span id='Ext-ToolTip-method-onMouseMove'> // private
  172. </span> onMouseMove : function(e){
  173. var t = this.delegate ? e.getTarget(this.delegate) : this.triggerElement = true;
  174. if (t) {
  175. this.targetXY = e.getXY();
  176. if (t === this.triggerElement) {
  177. if(!this.hidden &amp;&amp; this.trackMouse){
  178. this.setPagePosition(this.getTargetXY());
  179. }
  180. } else {
  181. this.hide();
  182. this.lastActive = new Date(0);
  183. this.onTargetOver(e);
  184. }
  185. } else if (!this.closable &amp;&amp; this.isVisible()) {
  186. this.hide();
  187. }
  188. },
  189. <span id='Ext-ToolTip-method-getTargetXY'> // private
  190. </span> getTargetXY : function(){
  191. if(this.delegate){
  192. this.anchorTarget = this.triggerElement;
  193. }
  194. if(this.anchor){
  195. this.targetCounter++;
  196. var offsets = this.getOffsets(),
  197. xy = (this.anchorToTarget &amp;&amp; !this.trackMouse) ? this.el.getAlignToXY(this.anchorTarget, this.getAnchorAlign()) : this.targetXY,
  198. dw = Ext.lib.Dom.getViewWidth() - 5,
  199. dh = Ext.lib.Dom.getViewHeight() - 5,
  200. de = document.documentElement,
  201. bd = document.body,
  202. scrollX = (de.scrollLeft || bd.scrollLeft || 0) + 5,
  203. scrollY = (de.scrollTop || bd.scrollTop || 0) + 5,
  204. axy = [xy[0] + offsets[0], xy[1] + offsets[1]],
  205. sz = this.getSize();
  206. this.anchorEl.removeClass(this.anchorCls);
  207. if(this.targetCounter &lt; 2){
  208. if(axy[0] &lt; scrollX){
  209. if(this.anchorToTarget){
  210. this.defaultAlign = 'l-r';
  211. if(this.mouseOffset){this.mouseOffset[0] *= -1;}
  212. }
  213. this.anchor = 'left';
  214. return this.getTargetXY();
  215. }
  216. if(axy[0]+sz.width &gt; dw){
  217. if(this.anchorToTarget){
  218. this.defaultAlign = 'r-l';
  219. if(this.mouseOffset){this.mouseOffset[0] *= -1;}
  220. }
  221. this.anchor = 'right';
  222. return this.getTargetXY();
  223. }
  224. if(axy[1] &lt; scrollY){
  225. if(this.anchorToTarget){
  226. this.defaultAlign = 't-b';
  227. if(this.mouseOffset){this.mouseOffset[1] *= -1;}
  228. }
  229. this.anchor = 'top';
  230. return this.getTargetXY();
  231. }
  232. if(axy[1]+sz.height &gt; dh){
  233. if(this.anchorToTarget){
  234. this.defaultAlign = 'b-t';
  235. if(this.mouseOffset){this.mouseOffset[1] *= -1;}
  236. }
  237. this.anchor = 'bottom';
  238. return this.getTargetXY();
  239. }
  240. }
  241. this.anchorCls = 'x-tip-anchor-'+this.getAnchorPosition();
  242. this.anchorEl.addClass(this.anchorCls);
  243. this.targetCounter = 0;
  244. return axy;
  245. }else{
  246. var mouseOffset = this.getMouseOffset();
  247. return [this.targetXY[0]+mouseOffset[0], this.targetXY[1]+mouseOffset[1]];
  248. }
  249. },
  250. <span id='Ext-ToolTip-method-getMouseOffset'> getMouseOffset : function(){
  251. </span> var offset = this.anchor ? [0,0] : [15,18];
  252. if(this.mouseOffset){
  253. offset[0] += this.mouseOffset[0];
  254. offset[1] += this.mouseOffset[1];
  255. }
  256. return offset;
  257. },
  258. <span id='Ext-ToolTip-method-getAnchorPosition'> // private
  259. </span> getAnchorPosition : function(){
  260. if(this.anchor){
  261. this.tipAnchor = this.anchor.charAt(0);
  262. }else{
  263. var m = this.defaultAlign.match(/^([a-z]+)-([a-z]+)(\?)?$/);
  264. if(!m){
  265. throw 'AnchorTip.defaultAlign is invalid';
  266. }
  267. this.tipAnchor = m[1].charAt(0);
  268. }
  269. switch(this.tipAnchor){
  270. case 't': return 'top';
  271. case 'b': return 'bottom';
  272. case 'r': return 'right';
  273. }
  274. return 'left';
  275. },
  276. <span id='Ext-ToolTip-method-getAnchorAlign'> // private
  277. </span> getAnchorAlign : function(){
  278. switch(this.anchor){
  279. case 'top' : return 'tl-bl';
  280. case 'left' : return 'tl-tr';
  281. case 'right': return 'tr-tl';
  282. default : return 'bl-tl';
  283. }
  284. },
  285. <span id='Ext-ToolTip-method-getOffsets'> // private
  286. </span> getOffsets : function(){
  287. var offsets,
  288. ap = this.getAnchorPosition().charAt(0);
  289. if(this.anchorToTarget &amp;&amp; !this.trackMouse){
  290. switch(ap){
  291. case 't':
  292. offsets = [0, 9];
  293. break;
  294. case 'b':
  295. offsets = [0, -13];
  296. break;
  297. case 'r':
  298. offsets = [-13, 0];
  299. break;
  300. default:
  301. offsets = [9, 0];
  302. break;
  303. }
  304. }else{
  305. switch(ap){
  306. case 't':
  307. offsets = [-15-this.anchorOffset, 30];
  308. break;
  309. case 'b':
  310. offsets = [-19-this.anchorOffset, -13-this.el.dom.offsetHeight];
  311. break;
  312. case 'r':
  313. offsets = [-15-this.el.dom.offsetWidth, -13-this.anchorOffset];
  314. break;
  315. default:
  316. offsets = [25, -13-this.anchorOffset];
  317. break;
  318. }
  319. }
  320. var mouseOffset = this.getMouseOffset();
  321. offsets[0] += mouseOffset[0];
  322. offsets[1] += mouseOffset[1];
  323. return offsets;
  324. },
  325. <span id='Ext-ToolTip-method-onTargetOver'> // private
  326. </span> onTargetOver : function(e){
  327. if(this.disabled || e.within(this.target.dom, true)){
  328. return;
  329. }
  330. var t = e.getTarget(this.delegate);
  331. if (t) {
  332. this.triggerElement = t;
  333. this.clearTimer('hide');
  334. this.targetXY = e.getXY();
  335. this.delayShow();
  336. }
  337. },
  338. <span id='Ext-ToolTip-method-delayShow'> // private
  339. </span> delayShow : function(){
  340. if(this.hidden &amp;&amp; !this.showTimer){
  341. if(this.lastActive.getElapsed() &lt; this.quickShowInterval){
  342. this.show();
  343. }else{
  344. this.showTimer = this.show.defer(this.showDelay, this);
  345. }
  346. }else if(!this.hidden &amp;&amp; this.autoHide !== false){
  347. this.show();
  348. }
  349. },
  350. <span id='Ext-ToolTip-method-onTargetOut'> // private
  351. </span> onTargetOut : function(e){
  352. if(this.disabled || e.within(this.target.dom, true)){
  353. return;
  354. }
  355. this.clearTimer('show');
  356. if(this.autoHide !== false){
  357. this.delayHide();
  358. }
  359. },
  360. <span id='Ext-ToolTip-method-delayHide'> // private
  361. </span> delayHide : function(){
  362. if(!this.hidden &amp;&amp; !this.hideTimer){
  363. this.hideTimer = this.hide.defer(this.hideDelay, this);
  364. }
  365. },
  366. <span id='Ext-ToolTip-method-hide'> /**
  367. </span> * Hides this tooltip if visible.
  368. */
  369. hide: function(){
  370. this.clearTimer('dismiss');
  371. this.lastActive = new Date();
  372. if(this.anchorEl){
  373. this.anchorEl.hide();
  374. }
  375. Ext.ToolTip.superclass.hide.call(this);
  376. delete this.triggerElement;
  377. },
  378. <span id='Ext-ToolTip-method-show'> /**
  379. </span> * Shows this tooltip at the current event target XY position.
  380. */
  381. show : function(){
  382. if(this.anchor){
  383. // pre-show it off screen so that the el will have dimensions
  384. // for positioning calcs when getting xy next
  385. this.showAt([-1000,-1000]);
  386. this.origConstrainPosition = this.constrainPosition;
  387. this.constrainPosition = false;
  388. this.anchor = this.origAnchor;
  389. }
  390. this.showAt(this.getTargetXY());
  391. if(this.anchor){
  392. this.anchorEl.show();
  393. this.syncAnchor();
  394. this.constrainPosition = this.origConstrainPosition;
  395. }else{
  396. this.anchorEl.hide();
  397. }
  398. },
  399. <span id='Ext-ToolTip-method-showAt'> // inherit docs
  400. </span> showAt : function(xy){
  401. this.lastActive = new Date();
  402. this.clearTimers();
  403. Ext.ToolTip.superclass.showAt.call(this, xy);
  404. if(this.dismissDelay &amp;&amp; this.autoHide !== false){
  405. this.dismissTimer = this.hide.defer(this.dismissDelay, this);
  406. }
  407. if(this.anchor &amp;&amp; !this.anchorEl.isVisible()){
  408. this.syncAnchor();
  409. this.anchorEl.show();
  410. }else{
  411. this.anchorEl.hide();
  412. }
  413. },
  414. <span id='Ext-ToolTip-method-syncAnchor'> // private
  415. </span> syncAnchor : function(){
  416. var anchorPos, targetPos, offset;
  417. switch(this.tipAnchor.charAt(0)){
  418. case 't':
  419. anchorPos = 'b';
  420. targetPos = 'tl';
  421. offset = [20+this.anchorOffset, 2];
  422. break;
  423. case 'r':
  424. anchorPos = 'l';
  425. targetPos = 'tr';
  426. offset = [-2, 11+this.anchorOffset];
  427. break;
  428. case 'b':
  429. anchorPos = 't';
  430. targetPos = 'bl';
  431. offset = [20+this.anchorOffset, -2];
  432. break;
  433. default:
  434. anchorPos = 'r';
  435. targetPos = 'tl';
  436. offset = [2, 11+this.anchorOffset];
  437. break;
  438. }
  439. this.anchorEl.alignTo(this.el, anchorPos+'-'+targetPos, offset);
  440. },
  441. <span id='Ext-ToolTip-method-setPagePosition'> // private
  442. </span> setPagePosition : function(x, y){
  443. Ext.ToolTip.superclass.setPagePosition.call(this, x, y);
  444. if(this.anchor){
  445. this.syncAnchor();
  446. }
  447. },
  448. <span id='Ext-ToolTip-method-clearTimer'> // private
  449. </span> clearTimer : function(name){
  450. name = name + 'Timer';
  451. clearTimeout(this[name]);
  452. delete this[name];
  453. },
  454. <span id='Ext-ToolTip-method-clearTimers'> // private
  455. </span> clearTimers : function(){
  456. this.clearTimer('show');
  457. this.clearTimer('dismiss');
  458. this.clearTimer('hide');
  459. },
  460. <span id='Ext-ToolTip-method-onShow'> // private
  461. </span> onShow : function(){
  462. Ext.ToolTip.superclass.onShow.call(this);
  463. Ext.getDoc().on('mousedown', this.onDocMouseDown, this);
  464. },
  465. <span id='Ext-ToolTip-method-onHide'> // private
  466. </span> onHide : function(){
  467. Ext.ToolTip.superclass.onHide.call(this);
  468. Ext.getDoc().un('mousedown', this.onDocMouseDown, this);
  469. },
  470. <span id='Ext-ToolTip-method-onDocMouseDown'> // private
  471. </span> onDocMouseDown : function(e){
  472. if(this.autoHide !== true &amp;&amp; !this.closable &amp;&amp; !e.within(this.el.dom)){
  473. this.disable();
  474. this.doEnable.defer(100, this);
  475. }
  476. },
  477. <span id='Ext-ToolTip-method-doEnable'> // private
  478. </span> doEnable : function(){
  479. if(!this.isDestroyed){
  480. this.enable();
  481. }
  482. },
  483. <span id='Ext-ToolTip-method-onDisable'> // private
  484. </span> onDisable : function(){
  485. this.clearTimers();
  486. this.hide();
  487. },
  488. <span id='Ext-ToolTip-method-adjustPosition'> // private
  489. </span> adjustPosition : function(x, y){
  490. if(this.constrainPosition){
  491. var ay = this.targetXY[1], h = this.getSize().height;
  492. if(y &lt;= ay &amp;&amp; (y+h) &gt;= ay){
  493. y = ay-h-5;
  494. }
  495. }
  496. return {x : x, y: y};
  497. },
  498. <span id='Ext-ToolTip-method-beforeDestroy'> beforeDestroy : function(){
  499. </span> this.clearTimers();
  500. Ext.destroy(this.anchorEl);
  501. delete this.anchorEl;
  502. delete this.target;
  503. delete this.anchorTarget;
  504. delete this.triggerElement;
  505. Ext.ToolTip.superclass.beforeDestroy.call(this);
  506. },
  507. <span id='Ext-ToolTip-method-onDestroy'> // private
  508. </span> onDestroy : function(){
  509. Ext.getDoc().un('mousedown', this.onDocMouseDown, this);
  510. Ext.ToolTip.superclass.onDestroy.call(this);
  511. }
  512. });
  513. Ext.reg('tooltip', Ext.ToolTip);</pre>
  514. </body>
  515. </html>