Results 1 to 2 of 2

Thread: Layout config for Ext.view.View ?

  1. #1

    Default Answered: Layout config for Ext.view.View ?

    Hey there, I am currently following this tutorial from the docs: https://docs.sencha.com/extjs/7.0.0/...Be_Coding.html

    When it comes to using the dataview component users are advised to use Ext.view.View for the classic toolkit instead of Ext.dataview.DataView (modern toolkit). (see: https://docs.sencha.com/extjs/7.0.0/....DataView.html)

    I pretty much use the exact same code as in the tutorial but always change the API definitions respectively to the classic toolkit.

    Now later on, it is neccessary to add some styling and when my result did not look quite right I discovered that in contrast to the dataView component Ext.view.View was missing the layout config.
    Therefore the result is not the same as in the tutorial.

    This is my code
    Code:
    Ext.define('.view.tunes.TunesView', { 
        extend: 'Ext.view.View',
        xtype: 'tunesview',
        scrollable: true,
        cls: 'tunes-view', 
        layout: {
                  type: 'box',
                  pack: 'space-around',
                  wrap: true
            },    
        itemCls: 'video', 
        itemTpl: [
            '<figure>',
            '<div class="thumbnail" style="background-image:url(\'{image}\')"></div>',
            '<figcaption><div class=\'title\'>{title}</div><div class=\'artist\'>{artist}</div></figcaption>',
            '</figure>'
        ]    
    });
    Does anybody know how to fix or work around this?

  2. Views don't use layouts, they don't extend container. You need to lay stuff out using css/styling.

  3. #2
    Sencha Premium User
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,258
    Answers
    759

    Default

    Views don't use layouts, they don't extend container. You need to lay stuff out using css/styling.

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
  •