From 815b4434b97b55dbe7fdb444bd7989f7e81a5efd Mon Sep 17 00:00:00 2001 From: kipz Date: Thu, 9 Sep 2010 00:48:34 -0400 Subject: [PATCH 1/4] give S2.FX.Parallel an example in PDoc --- src/effects/parallel.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/effects/parallel.js b/src/effects/parallel.js index 973efc0..8c188a4 100644 --- a/src/effects/parallel.js +++ b/src/effects/parallel.js @@ -2,6 +2,38 @@ * class S2.FX.Parallel < S2.FX.Base * * Effect to execute several other effects in parallel. + * + * Instead of reitering what exists for [[S2.FX]] and [[S2.FX.Base]], lets + * just get down to business with an example! + * + *

Morphing 2 elements example

+ * + * new S2.FX.Parallel([ // the parallel effect itself + * new S2.FX.Morph('element1_id', { // morph element1_id + * after: function() // after execution function + * { + * $('element2_id').update('morphing!'); // write this after executing + * }, + * delay: 0.1, // just a little starting delay + * duration: 0.9, // duration should equal 1 sec w/ delay + * position: 'parallel', // the queue position is 'parallel' + * style: 'height: 150px; width: 350px;', // resize our first element from 0x0 + * transition: 'spring' // a transition for element morphing + * }), + * new S2.FX.Morph('element2_id', { // morph element2_id + * after: function() // after execution function + * { + * $('element2_id').update('finished!'); // write this after executing + * }, + * delay: 0.25, // delay this slightly behind above + * duration: 0.75, // duration should equal 1 sec w/ delay + * position: 'parallel', // the queue position is 'parallel' + * style: 'opacity: 1; color: orange;', // morph the text we inserted + * transition: 'easeInOutCubic' // a transition for the text morphing + * }), + * ],{ + * duration: 1 // the overall length of this effect + * }); **/ S2.FX.Parallel = Class.create(S2.FX.Base, { initialize: function($super, effects, options) { From d3028c211f514f95a245881cac542f09819bb78f Mon Sep 17 00:00:00 2001 From: kipz Date: Thu, 9 Sep 2010 00:50:48 -0400 Subject: [PATCH 2/4] fix the copy and paste script src location (s2 instead of scripty2) --- templates/html/index.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/html/index.erb b/templates/html/index.erb index 71f13d7..c6964ef 100644 --- a/templates/html/index.erb +++ b/templates/html/index.erb @@ -56,7 +56,7 @@

To use scripty2, include this line in your HTML: -

<script src="prototype.scripty2.min.js" type="text/javascript"></script>
+
<script src="prototype.s2.min.js" type="text/javascript"></script>

For debugging, you can also include the libraries seperately: From 73f7d0dbfda4d1d207af425190d76ce41e788ce2 Mon Sep 17 00:00:00 2001 From: kipz Date: Thu, 9 Sep 2010 01:33:37 -0400 Subject: [PATCH 3/4] expand upon S2.FX.Parallel documentation --- src/effects/parallel.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/effects/parallel.js b/src/effects/parallel.js index 8c188a4..131338d 100644 --- a/src/effects/parallel.js +++ b/src/effects/parallel.js @@ -3,8 +3,8 @@ * * Effect to execute several other effects in parallel. * - * Instead of reitering what exists for [[S2.FX]] and [[S2.FX.Base]], lets - * just get down to business with an example! + * Instead of reitering what already exists for [[S2.FX]] and [[S2.FX.Base]], lets + * just get down to business with a quick example! * *

Morphing 2 elements example

* @@ -34,6 +34,14 @@ * ],{ * duration: 1 // the overall length of this effect * }); + * + *

Notes

+ * + * It is recommended that you set any effects position to "parallel" to ensure + * that it will be executed properly. + * + * As shown above, anything from [[S2.FX.Base]] can be applied to the parallel + * effect itself. **/ S2.FX.Parallel = Class.create(S2.FX.Base, { initialize: function($super, effects, options) { From 50e42f8702bc6b787376f955315878c7e5d5f835 Mon Sep 17 00:00:00 2001 From: kipz Date: Thu, 9 Sep 2010 01:34:03 -0400 Subject: [PATCH 4/4] quick grammar fix --- templates/html/index.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/html/index.erb b/templates/html/index.erb index c6964ef..8b74362 100644 --- a/templates/html/index.erb +++ b/templates/html/index.erb @@ -12,7 +12,7 @@

This rewrite of the script.aculo.us library is in beta. While we advise to proceed with caution, - scripty2 used in many live, production projects like twistori + scripty2 is used in many live, production projects like twistori and freckle and it works great!