简体   繁体   English

用于动画的Ext JS面板显示不起作用

[英]Ext js panel show used to animation is not working

Ext JS Modern Theme have a panel. Ext JS Modern Theme有一个面板。 This panel while tapping hide and again show the same panel with animation. 点按“隐藏”时此面板将再次显示带有动画的同一面板。 Now panel hiding is working but showing is not working. 现在,面板隐藏有效,但显示无效。 Any one find the problem? 有人发现问题吗?

Ext.defer() is working with alerts. Ext.defer()正在处理警报。 Only show function is not working. 仅显示功能不起作用。

{
 xtype  : 'panel',
 layout  : {
    type: 'vbox',
    align: 'center',
         },
 width   : '30%',
 name    : 'countImg',
 html    : '<div  > <img src="./resources/mala.png"></div>', 
 hideAnimation:{
     type        : 'slideOut',
     duration    : 500,
     direction   : 'top',
   },
 showAnimation:{
     type        : 'slideIn',
     duration    : 500,
     direction   : 'down',
   },
 listeners:
 {
   initialize: function()
  {
      this.element.on({
      tap: function()
      { 
       var imgPanelObj = Ext.ComponentQuery.query('panel[name=countImg]');
        imgPanelObj[0].hide();  
        Ext.defer( function(){
           imgPanelObj[0].show();
}, 500);
 }
     });
   }    
 }   
}

I want to show the panel again with animation after hiding panel. 我想在隐藏面板后再次显示带有动画的面板。 Its like slide up and slide down. 它就像向上和向下滑动。

{ 
   var imgPanelObj = Ext.ComponentQuery.query('panel[name=countImg]');
    imgPanelObj[0].hide();  
    Ext.defer( function(){
       imgPanelObj[0].show();
}, 1000);

Increase the duration it will work 增加有效期

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM