Permalink
Browse files

Attempt to detect active item and switch slide direction.

Raises error:
    Result of expression 'ListDemo.Viewport' [undefined] is not an object.
  • Loading branch information...
1 parent 66dbf0a commit 20855d99c34c1161e8bd684fbed6af7446f9a13c @nelstrom committed Dec 24, 2010
Showing with 4 additions and 1 deletion.
  1. +4 −1 public/javascripts/index.js
@@ -46,7 +46,10 @@ ListDemo = new Ext.Application({
ListDemo.Viewport = new Ext.Panel ({
fullscreen: true,
layout: 'card',
- cardSwitchAnimation: 'slide',
+ cardSwitchAnimation: {
+ type: 'slide',
+ direction: ListDemo.Viewport.getActiveItem().id == 'disclosurelist' ? 'left' : 'right'
+ },
items: [ListDemo.disclosureList, ListDemo.detailPanel]
});
}

0 comments on commit 20855d9

Please sign in to comment.