X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775..6e39d509471fe9b4e2660e0d1631b350d0c66f40:/pkgs/pkg-tips-debug.js diff --git a/pkgs/pkg-tips-debug.js b/pkgs/pkg-tips-debug.js index f9bc8274..a4c100f8 100644 --- a/pkgs/pkg-tips-debug.js +++ b/pkgs/pkg-tips-debug.js @@ -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]); }, // protected - doAutoWidth : function(){ + doAutoWidth : function(adjust){ + adjust = adjust || 0; var bw = this.body.getTextWidth(); if(this.title){ bw = Math.max(bw, this.header.child('span').getTextWidth(this.title)); } - bw += this.getFrameWidth() + (this.closable ? 20 : 0) + this.body.getPadding("lr"); + bw += this.getFrameWidth() + (this.closable ? 20 : 0) + this.body.getPadding("lr") + adjust; this.setWidth(bw.constrain(this.minWidth, this.maxWidth)); // IE7 repaint bug on initial show @@ -342,18 +343,17 @@ myGrid.on('render', function(grid) { } if(this.anchor){ this.targetCounter++; - var offsets = this.getOffsets(); - var xy = (this.anchorToTarget && !this.trackMouse) ? - this.el.getAlignToXY(this.anchorTarget, this.getAnchorAlign()) : - this.targetXY; - - var dw = Ext.lib.Dom.getViewWidth()-5; - var dh = Ext.lib.Dom.getViewHeight()-5; - var scrollX = (document.documentElement.scrollLeft || document.body.scrollLeft || 0)+5; - var scrollY = (document.documentElement.scrollTop || document.body.scrollTop || 0)+5; - - var axy = [xy[0] + offsets[0], xy[1] + offsets[1]]; - var sz = this.getSize(); + var offsets = this.getOffsets(), + xy = (this.anchorToTarget && !this.trackMouse) ? this.el.getAlignToXY(this.anchorTarget, this.getAnchorAlign()) : this.targetXY, + dw = Ext.lib.Dom.getViewWidth() - 5, + dh = Ext.lib.Dom.getViewHeight() - 5, + de = document.documentElement, + bd = document.body, + scrollX = (de.scrollLeft || bd.scrollLeft || 0) + 5, + scrollY = (de.scrollTop || bd.scrollTop || 0) + 5, + axy = [xy[0] + offsets[0], xy[1] + offsets[1]] + sz = this.getSize(); + this.anchorEl.removeClass(this.anchorCls); if(this.targetCounter < 2){ @@ -442,7 +442,8 @@ myGrid.on('render', function(grid) { // private getOffsets : function(){ - var offsets, ap = this.getAnchorPosition().charAt(0); + var offsets, + ap = this.getAnchorPosition().charAt(0); if(this.anchorToTarget && !this.trackMouse){ switch(ap){ case 't': @@ -662,6 +663,16 @@ myGrid.on('render', function(grid) { } return {x : x, y: y}; }, + + beforeDestroy : function(){ + this.clearTimers(); + Ext.destroy(this.anchorEl); + delete this.anchorEl; + delete this.target; + delete this.anchorTarget; + delete this.triggerElement; + Ext.ToolTip.superclass.beforeDestroy.call(this); + }, // private onDestroy : function(){ @@ -762,13 +773,12 @@ Ext.QuickTip = Ext.extend(Ext.ToolTip, { this.clearTimer('show'); } }, - - // private + getTipCfg: function(e) { var t = e.getTarget(), ttp, cfg; - if(this.interceptTitles && t.title){ + if(this.interceptTitles && t.title && Ext.isString(t.title)){ ttp = t.title; t.qtip = ttp; t.removeAttribute("title");