Results 1 to 2 of 2

Thread: Clearification regarding viewports

  1. #1
    Sencha User
    Join Date
    Oct 2014
    Posts
    20
    Answers
    2

    Default Answered: Clearification regarding viewports

    Hey,

    I still try to improve my app and I have some trouble to understand why there is a viewport.

    Do I really need a viewport? I dont know why i can't just use an Component like an container and set his layout to 'fit'.

    I would like to get rid of the viewport component. At the moment i have to use something like:

    Code:
    plugins: 'viewport',
    or the direct creation:

    Code:
    var viewport = Ext.create( 'Ext.container.Viewport', {
     items: [ Ext.create( 'view.myBaseView') ],
     layout : 'fit'
    });
     viewport.show();
    Is there any other way to handle this "overhead"?

    kind regards

  2. A layout governs how child components are laid out inside the container.

    The viewport is there to always size to the browser window dimensions.

  3. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,256
    Answers
    759

    Default

    A layout governs how child components are laid out inside the container.

    The viewport is there to always size to the browser window dimensions.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •