-
25 Apr 2012 11:21 AM #1
setDirection() in Sencha Designer 2
setDirection() in Sencha Designer 2
Hi! thanks for your time!
Looking at the example you provided in the kitchensink you have this:
Based on that example I don't know how to assign the animation = {} property using Sencha designer 2 (I think there is no way). Then I tried to do it programmatic and it didn't worked. I just want to animate from right to left when I change the active card. any idea? thanks!Code:text: 'Slide Right', card: false, id: 'SlideRight', view: 'SlideRight', animation: { type: 'slide', direction: 'right' },
This is my code
Code:buttonBackImageDetalle: function(button, e, options) { var main = this.getMain(); Ext.fx.Animation.setDirection('right'); main.setActiveItem(1); console.log('<-- back'); }
-
27 Apr 2012 5:03 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,128
- Vote Rating
- 453
Instead of affecting the direction, I usually change the reverse config using setReversed(false)
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
27 Apr 2012 5:23 AM #3
-
27 Apr 2012 5:28 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,128
- Vote Rating
- 453
The animation config is on the layout. Get that and then do the setReversed
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
27 Apr 2012 5:01 PM #5
Try this code:
and the you call setActiveMethod() to trigger the animation.Code:main.getLayout().setAnimation({ type : 'slide', direction : 'right' // or left });
Cheers!


Reply With Quote