aboutsummaryrefslogtreecommitdiffstats
path: root/demos/effect/easing.html
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2009-04-23 21:03:48 +0000
committerJörn Zaefferer <joern.zaefferer@gmail.com>2009-04-23 21:03:48 +0000
commit45492ac3468a3b7475721c68b833f29a2083c7dd (patch)
treef5ba3cd661ec039beb1f6cbadc986941f0c97f23 /demos/effect/easing.html
parent2fac011e4abb33820c247cda3848be7ff21c9ac5 (diff)
downloadjquery-ui-45492ac3468a3b7475721c68b833f29a2083c7dd.tar.gz
jquery-ui-45492ac3468a3b7475721c68b833f29a2083c7dd.zip
effects: demo visualising easing functions, tuning
Diffstat (limited to 'demos/effect/easing.html')
-rw-r--r--demos/effect/easing.html10
1 files changed, 7 insertions, 3 deletions
diff --git a/demos/effect/easing.html b/demos/effect/easing.html
index 043c4caa8..34ab83cc5 100644
--- a/demos/effect/easing.html
+++ b/demos/effect/easing.html
@@ -38,10 +38,12 @@
}
var i = 0;
$.each($.easing, function(name, impl) {
- if (!$.isFunction(impl))
+ // skip linera/jswing and any non functioning implementation
+ if (!$.isFunction(impl) || /linear|jswing/.test(name))
return;
var graph = $("<div/>").addClass("graph").appendTo("#graphs");
$("<div/>").text(++i + ". " + name).appendTo(graph);
+
var canvas = $("<canvas/>").appendTo(graph)[0]
canvas.width = 100;
canvas.height = 100;
@@ -56,7 +58,9 @@
ctx.moveTo(index * 10 + 10.5, 96);
ctx.lineTo(index * 10 + 10.5, 100);
ctx.stroke();
- })
+ });
+
+ // needs higher precision for better graphs
$.each(new Array(100), function(position) {
var mod = impl(0, position, 0, 1, 100);
ctx.beginPath();
@@ -84,7 +88,7 @@
<div class="demo-description">
-<p>All easings provided by jQuery UI are drawn above. Click a diagram to see the easing in action. "linear" and "jswing" aren't rendered properly, but work, too.</p>
+<p>All easings provided by jQuery UI are drawn above. Click a diagram to see the easing in action.</p>
</div><!-- End demo-description -->