Results 1 to 6 of 6

Thread: Responsive Config for Layout Type

  1. #1

    Default Responsive Config for Layout Type

    Admins, feel free to delete. This question was previously answered: https://www.sencha.com/forum/showthr...e-config-issue

    This seems like it would be a pretty common scenario. I have 2 containers. They are side by side. When the page gets under a certain width, i would like them stacked. They both have a flex of 1.

    Code:
    responsiveConfig: {        'width > 768': {
                layout: {
                    type: 'hbox',
                    align: 'stretch',
                    pack: 'start'
                }
            },
            'width <= 768': {
                layout: {
                    type: 'vbox',
                    align: 'stretch',
                    pack: 'start'
                }
            }
        },
    The following error gets thrown when shrinking the browser

    Code:
    Uncaught TypeError: Cannot read property 'dom' of undefined
    Code:
        /**     * Moves Component to the provided target instead.
         * @private
         */
        moveItem: function(item, target, position) {
            target = target.dom || target; <<<== the offending line
            if (typeof position === 'number') {
                position = target.childNodes[position];
            }
            target.insertBefore(item.el.dom, position || null);
            item.container = Ext.get(target);
            this.configureItem(item);
        },

  2. #2

    Default

    I have the same problem. Any idea to resolve error?Thanks, Enrico

  3. #3
    Sencha User bressi's Avatar
    Join Date
    Jan 2016
    Posts
    20

    Default

    I have the same issue too.
    Can anyone let us know how to resolve ?

    Regards,
    Claudia

  4. #4
    Sencha User
    Join Date
    Apr 2016
    Posts
    1

    Default

    The solution here seems to be to use layout 'box' with the vertical config:

    Code:
    responsiveConfig: {                           
         'width < 1024': {
                  layout: {
                           type: 'box',
                           vertical: true,
                           align: 'stretch'
                    }
            },
            'width >= 1024': {
                    layout: {
                        type: 'box',
                        align: 'stretch',
                        vertical: false
                   }
             }
    }

  5. #5
    Sencha User bressi's Avatar
    Join Date
    Jan 2016
    Posts
    20

    Default

    Hi,

    The solution seems ok but I am working on SA 3.5.1 and here I am not able to use layout 'box'.
    Regards,
    Claudia

  6. #6
    Sencha Premium User
    Join Date
    Mar 2012
    Location
    germany
    Posts
    28

    Default

    Set it dynamically

Similar Threads

  1. Responsive config issue
    By kkn in forum Ext 5: Q&A
    Replies: 5
    Last Post: 22 Jul 2015, 3:41 PM
  2. Responsive Config & Retina Display
    By worthlutz in forum Ext 5: Q&A
    Replies: 2
    Last Post: 20 Mar 2015, 12:36 PM
  3. Set columnWidth in responsive config
    By jineeshmg in forum Ext 5: Q&A
    Replies: 1
    Last Post: 4 Dec 2014, 12:10 PM
  4. Replies: 3
    Last Post: 13 Nov 2014, 3:45 PM
  5. [FIXED] Could not change Panel Layout Config Type from string to Object
    By mirws in forum Sencha Architect 2.x: Bugs
    Replies: 4
    Last Post: 22 Feb 2013, 2:16 AM

Posting Permissions

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