Permalink
Browse files

adding some reflect functions and allowing origin to animate. cleanin…

…g up code.
  • Loading branch information...
1 parent 964fa2e commit 0cae931d4b949878331c0aedfb007a932b48ea64 @heygrady committed May 21, 2010
Showing with 192 additions and 98 deletions.
  1. +10 −3 lib/form.js
  2. +158 −94 lib/jquery.transform.js
  3. +24 −1 transform.html
View
@@ -16,6 +16,10 @@
* @var Object
*/
var fields = {
+ reflect: $('#reflect'),
+ reflectX: $('#reflectX'),
+ reflectY: $('#reflectY'),
+ reflectXY: $('#reflectXY'),
rotate: $('#rotate'),
scale: {
x: $('#scale-x'),
@@ -58,6 +62,8 @@
} else if (x) {
val = x;
}
+ } else if ($.transform.rfunc.reflect.test(key)) {
+ val = field.is(':checked');
} else {
var x = field.val();
if (x) {
@@ -74,11 +80,12 @@
funcs[func] = val.join(' ');
}
});
- $('#target, #target2').transform({}).animate(funcs);
+ $('#target').transform({}).animate(funcs);
+ $('#target2').transform({origin: [0, 0]}).animate(funcs);
} else {
$('#target').transform(funcs);
-
- $('#target2').transform(funcs, true);
+ funcs['origin'] = [0, 0];
+ $('#target2').transform(funcs, {forceMatrix: true});
}
}
})(jQuery, this, this.document);
Oops, something went wrong.

0 comments on commit 0cae931

Please sign in to comment.