1. #1
    Touch Premium Member svenna's Avatar
    Join Date
    Jun 2007
    Location
    Oslo,Norway
    Posts
    562
    Vote Rating
    26
    svenna has a spectacular aura about svenna has a spectacular aura about

      0  

    Default configure default viewport

    configure default viewport


    Hi,

    I'm often creating small tools in Architect ExtJs 4.1, and they all use a viewport and a panel of sort.

    the application config has a config autoCreateViewport, this "works"
    but how do I set the config of that autocreated viewport?

    I need to set layout:'fit'.

    I always end up view autoCreateViewport:false and then adding it manually and creating it in app launch. But since ExtJs has the config, and Architect has the "Use as Initial view" config, there must be some logic I'm missing.

    I can't really see what the "set as default view" does (in source)
    Sven Tore Iversen

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,352
    Vote Rating
    127
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    It instantiates an instance of whatever you have marked as the top level view.

    Configure the top level view; maybe you can give us some more details as to what you're trying to accomplish and we can give you a better answer.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  3. #3
    Touch Premium Member svenna's Avatar
    Join Date
    Jun 2007
    Location
    Oslo,Norway
    Posts
    562
    Vote Rating
    26
    svenna has a spectacular aura about svenna has a spectacular aura about

      0  

    Default


    aah your answer is good enough.

    I expected a viewport to be created, even though I had not added it from the component panel, and then have the panel added to the viewport. If that was the case I need to set the viewport to layout:fit somehow.

    But if I have to add a viewport manually from the component panel, and then set it as the initial view it's easy to configure. I though that this would give a collision of two viewports, one auto created and then one added manually.

    btw, the app structure is simple
    Viewport (layout:fit)
    - Panel (layout:fit)
    - - etc...
    Sven Tore Iversen

Thread Participants: 1