Click to search on your search term.
Subscribe to Fig Leaf Tutorials


Need help with a project? Contact us at sales@figleaf.com.
From code reviews to project "jumpstarts" and full life-cycle development, we've got you covered!
Check out our case studies!
Follow us on Twitter!
Click here to join our Facebook group!

Ready to upgrade your skills? Try these instructor-led classes in Washington, DC:
Ext JS 6 Bootcamp
12/04/2017

Instantiating a Viewport

Page of 168

The Ext.container.Viewport class does not have any class-specific configuration properties. In effect, it is simply an Ext.Container that automatically scales to fit the html document body. Typically, your viewport is defined inside of the views/Viewport.js file of your application as illustrated by the following code snippet:

Ext.define('MyApp.view.Viewport', {
  extend: 'Ext.container.Viewport'
}

Sencha MVC for Ext JS 4 guarantees that the /app/view/Viewport.js file will be automatically loaded and instantiated if the autoCreateViewport property is set to true from within your Ext.application() definition as illustrated below:

Ext.application({
  name: 'MyApp',
  autoCreateViewport: true,
  controllers: ['Main'],
  launch: function() {

  }
});
Page of 168
comments powered by Disqus