I am using Sencha touch 2.0.1.1.
In the view I am doing some animation in dragend function of a container and on this animation end I want to perform some more things, but the after
handler is not taking function as handler. Here is the code
Ext.Animator.run({
element: dataview.element,
duration: 500,
autoClear : true,
easing: 'ease-in',
preserveEndState: true,
to: {
height: to_h
},
from: {
height: dataview.element.getHeight()
},
after: function() {
console.log ("After run");
}
});
This is the error I get:
Uncaught Error: [ERROR][Ext.fx.animation.Abstract#applyAfter] Invalid config, must be a valid config object Console.js:17
but this somehow works if I do like this:
Ext.Animator.run({
element: dataview.element,
duration: 500,
autoClear : true,
easing: 'ease-in',
preserveEndState: true,
to: {
height: to_h
},
from: {
height: dataview.element.getHeight()
},
after: {
fn : console.log (this)
}
});
Since I want to do bunch of things apart from just console.log so can someone suggest me right way to use this handler to execute a function which is written in-place or in the view?