varstore = ext.create (' Ext.data.Store ', {storeId:' Employeestore ', fields:[' Name ', ' seniority ', ' Department '], GroupField:' Department ', data: {' Employees ':[ { "Name": "Michael Scott", "seniority": 7, "department": "Management" }, { "Name": "Dwight schrute", "seniority": 2, "department": "Sales" }, { "Name": "Jim Halpert", "seniority": 3, "department": "Sales" }, { "Name": "Kevin Malone", "seniority": 4, "department": "Accounting" }, { "Name": "Angela Martin", "seniority": 5, "department": "Accounting"}]}, Proxy: {type:' Memory ', Reader: {type:' JSON ', Root:' Employees ' } } }); varMyComponent = ext.create (' Ext.grid.Panel '), {renderTo:Ext.getBody (), Width:800, Height:500, layout:' Fit ', closable:true, //Hidden:false,Store:Ext.data.StoreManager.lookup (' Employeestore '), columns: [{header:' Name ', Dataindex: ' Name ', flex:1}, {header:' Email ', dataindex: ' Email '}, {header:' Phone ', dataindex: ' Phone '}], title:' In Test ', //style: ' border:1px solid red; ',listeners: {beforeclose:function() {Mycomponent.getel (). Slideout ("R", {duration:500}); //5 Seconds to close here . return false; } } }); Ext.create (' Ext.fx.Anim ', {target:mycomponent, Duration:1000, from: {width:1000, Height:800//Start width}, to: {left:200//width //Height}, iterations:1,//Number of animationsEasing: ' Backout ',//Middle ValueAlternatetrue //Animation inversion }); Ext.create (' Ext.fx.Animator ', {target:mycomponent, Duration:1000,//Ten secondskeyframes: {0: {opacity:1, left:100 }, 20: {x:30, left:150 }, 40: {x:130, left:75 }, 60: {y:80, left:100 }, 80: {y:200 }, 100: {opacity:1, BackgroundColor:' 00ff00 ' } } });
ExtJS Simple Animation 2