0
我正在使用Sencha touch 2.0.1.1。 在視圖中,我在容器的dragend函數中做了一些動畫,並且在這個動畫結束時,我想執行一些更多的事情,但after
處理程序沒有將函數作爲處理函數。下面是代碼Sencha touch動畫的後處理程序沒有功能
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");
}
});
這是錯誤我得到:
Uncaught Error: [ERROR][Ext.fx.animation.Abstract#applyAfter] Invalid config, must be a valid config object Console.js:17
但如果我不喜歡這個這個莫名其妙的作品:
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)
}
});
因爲我想要做一堆東西除了console.log之外,有人可以建議我正確的方式來使用這個處理程序來執行一個函數,這個函數是就地編寫的還是視圖中的?