You found a bug! We've classified it as EXTJS-7494 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    Mar 2007
    Posts
    62
    Vote Rating
    2
    ojintoad is on a distinguished road

      0  

    Default Ext.tree.Panel and Ext.enableFx bug

    Ext.tree.Panel and Ext.enableFx bug


    I believe this is a bug, but since I don't actually have evidence of it being a bug other than reading the source and working with a local developer while we are speculating on changing the value for Ext.enableFx to false by default I figured I'd run it through the discussion forum first.

    If we look at the documentation for the configuration option for animate in Ext.tree.Panel: http://docs.sencha.com/ext-js/4-1/#!...el-cfg-animate

    True to enable animated expand/collapse. Defaults to the value of Ext.enableFx.
    And then compare it to the code in the constructor which uses it (http://docs.sencha.com/ext-js/4-1/so...-constructor):

    Code:
    constructor: function(config) {
            config = config || {};
            if (config.animate === undefined) {
                config.animate = Ext.isDefined(this.animate) ? this.animate : Ext.enableFx;
            }
            this.enableAnimations = config.animate;
            delete config.animate;
    
            this.callParent([config]);
        },
    As we see, config.animate, if isn't passed in, actually ends up with the assignment of whatever this.animate happens to be if it is Ext.isDefined (not equal to undefined). Since Ext.tree.Panel descends from Ext.AbstractComponent, this.animate, in the default case, will end up being Ext.AbstractComponent.animate, no?

    http://docs.sencha.com/ext-js/4-1/#!...method-animate

    Since that method by default exists then Ext.isDefined by default will always return true for this.animate, and the Ext.enableFx parameter is never actually reached. Sadface.

    The TreeView on the other hand simply ignores the animate method (http://docs.sencha.com/ext-js/4-1/so...-initComponent)

    Code:
    if (me.initialConfig.animate === undefined) {
                me.animate = Ext.enableFx;
            }
    I believe that the Ext.tree.Panel constructor should be switched to behave more like initComponent in Ext.tree.View. The documentation should at the very least be updated to explain that you would have to set the animate method to undefined (since isDefined is a strict check on that), though that would be a pretty odd step of declaring that at the class level or doing it in the constructor before the object is instantiated.

    Let me know if I can provide more information or if I don't understand how AbstractComponent.animate is intended to be used. I am attaching a screenshot of a debug case that shows the two methods are equal at the time of Ext.tree.Panel's constructor being executed.
    Attached Images

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,704
    Vote Rating
    750
    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


    Moved to bugs forum and I have opened a bug in our bug tracker.

  3. #3
    Sencha User
    Join Date
    Mar 2007
    Posts
    62
    Vote Rating
    2
    ojintoad is on a distinguished road

      0  

    Default


    Thank you for accepting.

    For those interested in a workaround, we apply the following override to initComponent:

    Code:
    initComponent: function() {
          this.enableAnimations = this.initialConfig.animate === true || Ext.enableFx;
          this.callParent(arguments);
       }
    which seems to resolve the issue.

Thread Participants: 1

Tags for this Thread

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