diff --git a/touch-gallery/touch-gallery.js b/touch-gallery/touch-gallery.js index f387636..23b5784 100644 --- a/touch-gallery/touch-gallery.js +++ b/touch-gallery/touch-gallery.js @@ -145,8 +145,8 @@ .width(l) .height(l) .insertBefore(target) - .transform('reset') - .transition({opacity: 1}, {delay: 1, duration: 0.8, onFinish: onFinish}); + .transform(false) + .transition({opacity: 1}, {delay: 200, duration: 0.8, onFinish: onFinish}); } /** @@ -222,7 +222,7 @@ top: 1-Math.floor((b.height-h) / 2) + 'px', // -1px offset to match Flickr's square crops left: -Math.floor((b.width-w) / 2) + 'px' })) - .transform('reset'); + .transform(false); b = bounds(div); diff --git a/transform/transform.js b/transform/transform.js index 32c80db..bcbc9ce 100644 --- a/transform/transform.js +++ b/transform/transform.js @@ -60,8 +60,8 @@ t = new Transformation(); el.data('transform', t); } - if (commands) { - if (commands == 'reset' || commands.reset) { + if (commands !== undefined) { + if (commands === false || commands.reset) { t.reset(); } else { @@ -177,7 +177,7 @@ this.each(function() { var $this = $(this); var t = transform($this, opts); - if (!opts) { + if (opts === undefined) { result = t.fn; return false; }