From 45492ac3468a3b7475721c68b833f29a2083c7dd Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=B6rn=20Zaefferer?= Date: Thu, 23 Apr 2009 21:03:48 +0000 Subject: [PATCH] effects: demo visualising easing functions, tuning --- demos/effect/easing.html | 10 +++++++--- 1 file 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 = $("
").addClass("graph").appendTo("#graphs"); $("
").text(++i + ". " + name).appendTo(graph); + var 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 @@
-

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.

+

All easings provided by jQuery UI are drawn above. Click a diagram to see the easing in action.

-- 2.39.5