<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The source code</title>
- <link href="../prettify/prettify.css" type="text/css" rel="stylesheet" />
- <script type="text/javascript" src="../prettify/prettify.js"></script>
+ <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
+ <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
<style type="text/css">
.highlight { display: block; background-color: #ddd; }
</style>
<span id='Ext-util-TextMetrics-method-constructor'> /**
</span> * Creates new TextMetrics.
- * @param {Mixed} bindTo The element to bind to.
+ * @param {String/HTMLElement/Ext.Element} bindTo The element or its ID to bind to.
* @param {Number} fixedWidth (optional) A fixed width to apply to the measuring element.
*/
constructor: function(bindTo, fixedWidth){
<span id='Ext-util-TextMetrics-method-bind'> /**
</span> * Binds this TextMetrics instance to a new element
- * @param {Mixed} el The element
+ * @param {String/HTMLElement/Ext.Element} el The element or its ID.
*/
bind: function(el){
var me = this;
delete me.measure;
}
}, function(){
- Ext.core.Element.addMethods({
-<span id='Ext-core-Element-method-getTextWidth'> /**
+ Ext.Element.addMethods({
+<span id='Ext-Element-method-getTextWidth'> /**
</span> * Returns the width in pixels of the passed text, or the width of the text in this Element.
* @param {String} text The text to measure. Defaults to the innerHTML of the element.
* @param {Number} min (optional) The minumum value to return.
* @param {Number} max (optional) The maximum value to return.
* @return {Number} The text width in pixels.
- * @member Ext.core.Element
+ * @member Ext.Element
*/
getTextWidth : function(text, min, max){
return Ext.Number.constrain(Ext.util.TextMetrics.measure(this.dom, Ext.value(text, this.dom.innerHTML, true)).width, min || 0, max || 1000000);