Browse Source

original-order sortBy -> `index`, set it as default sortBy

pull/14/head
David DeSandro 14 years ago
parent
commit
0654865da4
  1. 8
      src/jquery.molequul.js

8
src/jquery.molequul.js

@ -24,6 +24,7 @@
animationOptions: { animationOptions: {
queue: false queue: false
}, },
sortBy : 'index',
sortDir : 1 sortDir : 1
}, },
@ -445,12 +446,12 @@
props.positionFn = props.usingTransforms ? $.molequul.translate : $.molequul.positionAbs; props.positionFn = props.usingTransforms ? $.molequul.translate : $.molequul.positionAbs;
// sorting // sorting
var originalOrderSorter = { var indexSorter = {
'original-order' : function( $elem ) { 'index' : function( $elem ) {
return props.elemCount; return props.elemCount;
} }
}; };
props.opts.getSortData = $.extend( originalOrderSorter, props.opts.getSortData ); props.opts.getSortData = $.extend( indexSorter, props.opts.getSortData );
props.atoms.$all.molequul( 'setupAtoms', props ); props.atoms.$all.molequul( 'setupAtoms', props );
@ -531,6 +532,7 @@
$(window).unbind('smartresize.molequul'); $(window).unbind('smartresize.molequul');
} }
// reset this prop for next time
props.appending = false; props.appending = false;
// set all data so we can retrieve it for appended appendedContent // set all data so we can retrieve it for appended appendedContent

Loading…
Cancel
Save