Filter & sort magical layouts http://isotope.metafizzy.co
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

33 lines
800 B

( function( window ) {
'use strict';
// -------------------------- -------------------------- //
var Isotope = window.Isotope;
function LayoutMode( isotope ) {
this.isotope = isotope;
// link options to isotope.options
this.options = isotope && isotope.options[ this.namespace ];
}
// -------------------------- create -------------------------- //
LayoutMode.create = function( namespace, options ) {
// subclass LayoutMode
function Mode() {
LayoutMode.apply( this, arguments );
}
Mode.prototype = new LayoutMode();
Mode.prototype.namespace = namespace;
// set default options
Isotope.prototype.options[ namespace ] = options || {};
// register in Isotope
Isotope.layoutModes[ namespace ] = Mode;
return Mode;
};
Isotope.LayoutMode = LayoutMode;
})( window );