1. #1
    Sencha Premium Member
    Join Date
    Apr 2012
    Posts
    95
    Vote Rating
    0
    ahsec is on a distinguished road

      0  

    Default Unanswered: suspend events doesnt seem to work

    Unanswered: suspend events doesnt seem to work


    Hello all

    I tried preventing a panel from triggering a 'move' event by doing

    Ext.getCmp(panelsOrder[3]).suspendEvents(false);

    However, when I invoke

    Ext.getCmp(panelsOrder[3]).setPosition(width,height);

    It does trigger the 'move' event handler...

    Anything else I should have done and didn't?

    Thanks

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,677
    Answers
    3355
    Vote Rating
    749
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Running the following example in 4.1.2 doesn't fire the move event:

    Code:
    var panel = new Ext.panel.Panel({
        renderTo  : document.body,
        width     : 400,
        height    : 400,
        items     : [
            {
                xtype   : 'button',
                text    : 'Move',
                handler : function () {
                    panel.setPosition(
                        panel.x === 400 ? 0 : 400,
                        panel.y === 400 ? 0 : 400
                    );
                }
            },
            {
                xtype   : 'button',
                text    : 'suspendEvents',
                handler : function () {
                    panel.suspendEvents(false);
                }
            },
            {
                xtype   : 'button',
                text    : 'resumeEvents',
                handler : function () {
                    panel.resumeEvents();
                }
            }
        ],
        listeners : {
            move : function() {
                console.log('moved');
            }
        }
    });
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar