]> git.proxmox.com Git - sencha-touch.git/blobdiff - src/src/fx/layout/card/Pop.js
import Sencha Touch 2.4.2 source
[sencha-touch.git] / src / src / fx / layout / card / Pop.js
diff --git a/src/src/fx/layout/card/Pop.js b/src/src/fx/layout/card/Pop.js
new file mode 100644 (file)
index 0000000..b6000a8
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * @private
+ */
+Ext.define('Ext.fx.layout.card.Pop', {
+    extend: 'Ext.fx.layout.card.Style',
+
+    alias: 'fx.layout.card.pop',
+
+    config: {
+        duration: 500,
+
+        inAnimation: {
+            type: 'pop',
+            easing: 'ease-out'
+        },
+        outAnimation: {
+            type: 'pop',
+            easing: 'ease-in',
+            out: true
+        }
+    },
+
+    updateDuration: function(duration) {
+        var halfDuration = duration / 2,
+            inAnimation = this.getInAnimation(),
+            outAnimation = this.getOutAnimation();
+
+        inAnimation.setDelay(halfDuration);
+        inAnimation.setDuration(halfDuration);
+        outAnimation.setDuration(halfDuration);
+    }
+});