diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2009-04-23 21:37:07 +0000 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2009-04-23 21:37:07 +0000 |
commit | a0050d133758a52de3e80f9e3f221368b9ec2420 (patch) | |
tree | f19f497b88f6aa7acc8b6c201f426430f73ef12a | |
parent | c3d8917e56b29b125e9af81d58dfe583a26af0ec (diff) | |
download | jquery-ui-a0050d133758a52de3e80f9e3f221368b9ec2420.tar.gz jquery-ui-a0050d133758a52de3e80f9e3f221368b9ec2420.zip |
effects: demo visualising easing functions, tuning
-rw-r--r-- | demos/effect/easing.html | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/demos/effect/easing.html b/demos/effect/easing.html index 34ab83cc5..72f535f67 100644 --- a/demos/effect/easing.html +++ b/demos/effect/easing.html @@ -61,13 +61,14 @@ });
// needs higher precision for better graphs
- $.each(new Array(100), function(position) {
- var mod = impl(0, position, 0, 1, 100);
- ctx.beginPath();
- ctx.moveTo(position, 100 - position * mod);
- ctx.lineTo(position + 1, 99 - position * mod);
- ctx.stroke();
+ var mod = 2;
+ ctx.beginPath();
+ $.each(new Array(100 * mod), function(position) {
+ var ease = impl(0, position, 0, 1, 100 * mod);
+ ctx.moveTo(position / mod, 100 - position / mod * ease);
+ ctx.lineTo(position / mod + 1, 99 - position / mod * ease);
});
+ ctx.stroke();
graph.click(function() {
$(canvas).animate({height: "hide"}, "slow", name).animate({height: "show"}, "slow", name);
});
@@ -88,7 +89,7 @@ <div class="demo-description">
-<p>All easings provided by jQuery UI are drawn above. Click a diagram to see the easing in action.</p>
+<p><strong>All easings provided by jQuery UI are drawn above, using a HTLM canvas element</strong>. Click a diagram to see the easing in action.</p>
</div><!-- End demo-description -->
|