Upgrade to ExtJS 4.0.2 - Released 06/09/2011
[extjs.git] / docs / source / Viewport.html
index 78b6e9e..e8b5027 100644 (file)
@@ -1,5 +1,22 @@
-<!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-container.Viewport-method-constructor'><span id='Ext-container.Viewport'>/**
-</span></span> * @class Ext.container.Viewport
+<!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-container-Viewport'>/**
+</span> * @class Ext.container.Viewport
  * @extends Ext.container.Container
 
 A specialized container representing the viewable application area (the browser viewport).
@@ -67,11 +84,7 @@ An example showing a classic application border layout:
         }]
     });
 
- * @constructor
- * Create a new Viewport
- * @param {Object} config The config object
  * @markdown
- * @xtype viewport
  */
 Ext.define('Ext.container.Viewport', {
     extend: 'Ext.container.Container',
@@ -84,37 +97,37 @@ Ext.define('Ext.container.Viewport', {
      * correct operation of the Viewport as the sole manager of the
      * layout of the document body.
      */
-<span id='Ext-container.Viewport-cfg-applyTo'>    /**
+<span id='Ext-container-Viewport-cfg-applyTo'>    /**
 </span>     * @cfg {Mixed} applyTo @hide
      */
-<span id='Ext-container.Viewport-cfg-allowDomMove'>    /**
+<span id='Ext-container-Viewport-cfg-allowDomMove'>    /**
 </span>     * @cfg {Boolean} allowDomMove @hide
      */
-<span id='Ext-container.Viewport-cfg-hideParent'>    /**
+<span id='Ext-container-Viewport-cfg-hideParent'>    /**
 </span>     * @cfg {Boolean} hideParent @hide
      */
-<span id='Ext-container.Viewport-cfg-renderTo'>    /**
+<span id='Ext-container-Viewport-cfg-renderTo'>    /**
 </span>     * @cfg {Mixed} renderTo @hide
      */
-<span id='Ext-container.Viewport-cfg-hideParent'>    /**
+<span id='Ext-container-Viewport-cfg-hideParent'>    /**
 </span>     * @cfg {Boolean} hideParent @hide
      */
-<span id='Ext-container.Viewport-cfg-height'>    /**
+<span id='Ext-container-Viewport-cfg-height'>    /**
 </span>     * @cfg {Number} height @hide
      */
-<span id='Ext-container.Viewport-cfg-width'>    /**
+<span id='Ext-container-Viewport-cfg-width'>    /**
 </span>     * @cfg {Number} width @hide
      */
-<span id='Ext-container.Viewport-cfg-autoHeight'>    /**
+<span id='Ext-container-Viewport-cfg-autoHeight'>    /**
 </span>     * @cfg {Boolean} autoHeight @hide
      */
-<span id='Ext-container.Viewport-cfg-autoWidth'>    /**
+<span id='Ext-container-Viewport-cfg-autoWidth'>    /**
 </span>     * @cfg {Boolean} autoWidth @hide
      */
-<span id='Ext-container.Viewport-cfg-deferHeight'>    /**
+<span id='Ext-container-Viewport-cfg-deferHeight'>    /**
 </span>     * @cfg {Boolean} deferHeight @hide
      */
-<span id='Ext-container.Viewport-cfg-monitorResize'>    /**
+<span id='Ext-container-Viewport-cfg-monitorResize'>    /**
 </span>     * @cfg {Boolean} monitorResize @hide
      */
 
@@ -136,16 +149,17 @@ Ext.define('Ext.container.Viewport', {
         el.setSize = Ext.emptyFn;
         el.dom.scroll = 'no';
         me.allowDomMove = false;
-        //this.autoWidth = true;
-        //this.autoHeight = true;
         Ext.EventManager.onWindowResize(me.fireResize, me);
         me.renderTo = me.el;
+        me.width = Ext.core.Element.getViewportWidth();
+        me.height = Ext.core.Element.getViewportHeight();
     },
 
     fireResize : function(w, h){
         // setSize is the single entry point to layouts
         this.setSize(w, h);
-        //this.fireEvent('resize', this, w, h, w, h);
     }
 });
-</pre></pre></body></html>
\ No newline at end of file
+</pre>
+</body>
+</html>