r2694 - labs: made coverflow work in FF 3.5, removed failing demo on carousel

r2694 - labs: made coverflow work in FF 3.5, removed failing demo on carousel


Author: paul.bakaus
Date: Wed Jun 10 19:51:49 2009
New Revision: 2694
Removed:
branches/labs/carousel/demo/no_animation.html
Modified:
branches/labs/carousel/demo/index.html
branches/labs/carousel/ui.carousel.js
branches/labs/coverflow/ui.coverflow.js
Log:
labs: made coverflow work in FF 3.5, removed failing demo on carousel
Modified: branches/labs/carousel/demo/index.html
==============================================================================
--- branches/labs/carousel/demo/index.html    (original)
+++ branches/labs/carousel/demo/index.html    Wed Jun 10 19:51:49 2009
@@ -10,7 +10,6 @@
    <h4>Examples</h4>
    <ul>
        <li class="demo-config-on"><a href="default.html">Default
functionality</a></li>
-        <li><a href="no_animation.html">Disabled animation</a></li>
        <li><a href="no_interaction.html">Disabled interaction</a></li>
        <li><a href="vertical.html">Vertical carousel</a></li>
        <li><a href="tilt.html">Tilt magic</a></li>
Modified: branches/labs/carousel/ui.carousel.js
==============================================================================
--- branches/labs/carousel/ui.carousel.js    (original)
+++ branches/labs/carousel/ui.carousel.js    Wed Jun 10 19:51:49 2009
@@ -29,7 +29,8 @@
            paddingX: this.element.outerWidth() / 2,
            paddingY: this.element.outerHeight() / 2,
            itemHeight: this.options.height || this.items.height(),
-            itemWidth: this.options.width || this.items.width()
+            itemWidth: this.options.width || this.items.width(),
+            offset: this.element.offset()
        });
        
        //Add pause/resume functionality when you hover a item
@@ -47,7 +48,7 @@
            self._startAnimation();
        $(this.options.handle || this.element)
-            .bind('mouseenter', function() {
+            .bind('mouseenter.carousel', function() {
                self.offset = self.element.offset();
            })
            .bind('mouseleave.carousel', function() {
@@ -157,7 +158,7 @@
$.extend($.ui.carousel, {
    defaults: {
-        animate: 0.005,
+        animate: 0.005, //TODO: Setting animate to false also currently blocks
animateByMouse
        animateByMouse: true,
        distance: 0.7,
        handle: false,
Modified: branches/labs/coverflow/ui.coverflow.js
==============================================================================
--- branches/labs/coverflow/ui.coverflow.js    (original)
+++ branches/labs/coverflow/ui.coverflow.js    Wed Jun 10 19:51:49 2009
@@ -12,7 +12,8 @@
*/
(function($){
-    var supportsTransforms = !($.browser.mozilla &&
(parseFloat($.browser.version) <= 1.9)) && !$.browser.opera;
+    var browserVersion = $.browser.version.replace(/^(\d+\.)(.*)$/,
function() { return arguments[1] + arguments[2].replace(/\./g, ''); });
+    var supportsTransforms = !($.browser.mozilla &&
(parseFloat(browserVersion) <= 1.9)) && !$.browser.opera;
    
    $.easing.easeOutQuint = function (x, t, b, c, d) {
        return c*((t=t/d-1)*t*t*t*t + 1) + b;
@@ -93,7 +94,7 @@
                    before = (i > from && i != to),
                    css = { zIndex: self.items.length + (side == "left" ? to-i : i-to) };
-                css[($.browser.safari ? 'webkit' : 'moz')+'Transform']
= 'matrix(1,'+(mod * (side == 'right' ? -0.5 : 0.5))+',0,1,0,0)
scale('+(1+((1-mod)*0.5))+')';
+                css[($.browser.safari ? 'webkit' : 'Moz')+'Transform']
= 'matrix(1,'+(mod * (side == 'right' ? -0.5 : 0.5))+',0,1,0,0)
scale('+(1+((1-mod)*0.5))+')';
                css[self.props[2]] = ( (-i * (self.itemSize/2)) + (side == 'right'?
-self.itemSize/2 : self.itemSize/2) * mod );
                
                if(!supportsTransforms) {