-<!DOCTYPE html><html><head><title>Sencha Documentation Project</title><link rel="stylesheet" href="../reset.css" type="text/css"><link rel="stylesheet" href="../prettify.css" type="text/css"><link rel="stylesheet" href="../prettify_sa.css" type="text/css"><script type="text/javascript" src="../prettify.js"></script></head><body onload="prettyPrint()"><pre class="prettyprint"><pre><span id='Ext-layout.container.Fit'>/**
+<!DOCTYPE html>
+<html>
+<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>
+ <style type="text/css">
+ .highlight { display: block; background-color: #ddd; }
+ </style>
+ <script type="text/javascript">
+ function highlight() {
+ document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
+ }
+ </script>
+</head>
+<body onload="prettyPrint(); highlight();">
+ <pre class="prettyprint lang-js"><span id='Ext-layout-container-Fit'>/**
</span> * @class Ext.layout.container.Fit
* @extends Ext.layout.container.AbstractFit
* <p>This is a base class for layouts that contain <b>a single item</b> that automatically expands to fill the layout's
setItemBox : function(item, box) {
var me = this;
if (item && box.height > 0) {
- if (me.isManaged('width') === true) {
+ if (!me.owner.isFixedWidth()) {
box.width = undefined;
}
- if (me.isManaged('height') === true) {
+ if (!me.owner.isFixedHeight()) {
box.height = undefined;
}
me.setItemSize(item, box.width, box.height);
}
+ },
+
+ configureItem: function(item) {
+
+ // Card layout only controls dimensions which IT has controlled.
+ // That calculation has to be determined at run time by examining the ownerCt's isFixedWidth()/isFixedHeight() methods
+ item.layoutManagedHeight = 0;
+ item.layoutManagedWidth = 0;
+
+ this.callParent(arguments);
}
-});</pre></pre></body></html>
\ No newline at end of file
+});</pre>
+</body>
+</html>