Browse Source

Add logic for disabling scale transform if they aren't supported

pull/14/head
David DeSandro 14 years ago
parent
commit
144a146ed6
  1. 18
      src/jquery.molequul.js
  2. 2
      src/jquery.opto-transform.js

18
src/jquery.molequul.js

@ -15,12 +15,10 @@
containerClass : 'molequul', containerClass : 'molequul',
hiddenClass : 'molequul-hidden', hiddenClass : 'molequul-hidden',
hiddenStyle : { hiddenStyle : {
opacity : 0, opacity : 0
scale : [ 0.001 ]
}, },
visibleStyle : { visibleStyle : {
opacity : 1, opacity : 1
scale : [ 1 ]
}, },
animationEngine : 'best-available', animationEngine : 'best-available',
animationOptions: { animationOptions: {
@ -558,6 +556,18 @@
}; };
// add transform default styles for filtered classes
if ( Modernizr.csstransforms ) {
$.molequul.defaults.hiddenStyle = {
opacity : 0,
scale : [ 0.001 ]
};
$.molequul.defaults.visibleStyle = {
opacity : 1,
scale : [ 1 ]
};
}
// molequul code begin // molequul code begin
$.fn.molequul = function( firstArg ) { $.fn.molequul = function( firstArg ) {

2
src/jquery.opto-transform.js

@ -56,6 +56,8 @@
} }
// get proper order // get proper order
// ideally, we could loop through this give an array, but since we only have
// a couple transforms we're keeping track of, we'll do it like so
var translateFn = transformObj.translate || '', var translateFn = transformObj.translate || '',
scaleFn = transformObj.scale || '', scaleFn = transformObj.scale || '',
valueFns = translateFn + scaleFn; valueFns = translateFn + scaleFn;

Loading…
Cancel
Save