Browse Source

⬆️ upgrade dependencies to remove IE8 versions

pull/1127/head
David DeSandro 9 years ago
parent
commit
adf436b09e
  1. 2
      Gruntfile.js
  2. 21
      bower.json
  3. 6
      js/isotope.js
  4. 2
      package.json
  5. 14
      sandbox/basic.html
  6. 20
      sandbox/bottom-up.html
  7. 9
      sandbox/cells-by-row.html
  8. 9
      sandbox/combination-filters-inclusive.html
  9. 14
      sandbox/combination-filters.html
  10. 48
      sandbox/filter-sort.html
  11. 29
      sandbox/fitrows.html
  12. 12
      sandbox/fluid.html
  13. 9
      sandbox/horizontal-layout-modes.html
  14. 54
      sandbox/insert.html
  15. 11
      sandbox/jquery.html
  16. 4
      sandbox/js/require-js.js
  17. 9
      sandbox/masonry-horizontal.html
  18. 31
      sandbox/masonry.html
  19. 20
      sandbox/right-to-left.html
  20. 35
      sandbox/sorting.html
  21. 26
      sandbox/stamps.html
  22. 19
      sandbox/transition-bug.html
  23. 2
      test/filtering.js
  24. 11
      test/helpers.js
  25. 9
      test/index.html
  26. 8
      test/sorting.js

2
Gruntfile.js

@ -29,7 +29,7 @@ module.exports = function( grunt ) {
options: {
baseUrl: 'bower_components',
include: [
'jquery-bridget/jquery.bridget',
'jquery-bridget/jquery-bridget',
'isotope/js/isotope'
],
out: 'dist/isotope.pkgd.js',

21
bower.json

@ -1,24 +1,17 @@
{
"name": "isotope",
"version": "2.2.2",
"description": "Filter and sort magical layouts",
"main": "js/isotope.js",
"dependencies": {
"get-size": "~1.2.2",
"matches-selector": "~1.0.2",
"outlayer": "~1.4.1",
"masonry": "~3.3.0",
"fizzy-ui-utils": "~1.0.1"
"get-size": "~2.0.0",
"desandro-matches-selector": "~2.0.0",
"outlayer": "~2.0.0",
"masonry": "~4.0.0",
"fizzy-ui-utils": "~2.0.0"
},
"devDependencies": {
"doc-ready": "1.x",
"isotope-cells-by-column": "1.x",
"isotope-cells-by-row": "1.x",
"isotope-fit-columns": "1.x",
"isotope-horizontal": "1.x",
"isotope-masonry-horizontal": "1.x",
"jquery": ">=1.4.3 <2",
"jquery-bridget": "1.1.x",
"jquery": "2 < 4",
"jquery-bridget": "^2",
"qunit": "^1.15"
},
"ignore": [

6
js/isotope.js

@ -1,11 +1,11 @@
/*!
* Isotope v2.2.2
* Isotope v3.0.0-beta1
*
* Licensed GPLv3 for open source use
* or Isotope Commercial License for commercial use
*
* http://isotope.metafizzy.co
* Copyright 2015 Metafizzy
* Copyright 2016 Metafizzy
*/
( function( window, factory ) {
@ -17,7 +17,7 @@
define( [
'outlayer/outlayer',
'get-size/get-size',
'matches-selector/matches-selector',
'desandro-matches-selector/matches-selector',
'fizzy-ui-utils/utils',
'./item',
'./layout-mode',

2
package.json

@ -1,6 +1,6 @@
{
"name": "isotope-layout",
"version": "2.2.2",
"version": "3.0.0-beta1",
"description": "Filter and sort magical layouts",
"main": "js/isotope.js",
"dependencies": {

14
sandbox/basic.html

@ -36,13 +36,9 @@
<div class="item"></div>
</div>
<script src="../bower_components/eventEmitter/EventEmitter.js"></script>
<script src="../bower_components/eventie/eventie.js"></script>
<script src="../bower_components/doc-ready/doc-ready.js"></script>
<script src="../bower_components/get-style-property/get-style-property.js"></script>
<script src="../bower_components/ev-emitter/ev-emitter.js"></script>
<script src="../bower_components/get-size/get-size.js"></script>
<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script>
<script src="../bower_components/matches-selector/matches-selector.js"></script>
<script src="../bower_components/desandro-matches-selector/matches-selector.js"></script>
<script src="../bower_components/fizzy-ui-utils/utils.js"></script>
<script src="../bower_components/outlayer/item.js"></script>
<script src="../bower_components/outlayer/outlayer.js"></script>
@ -53,11 +49,9 @@
<script src="../js/layout-modes/fit-rows.js"></script>
<script>
docReady( function() {
var container = document.querySelector('#basic');
var iso = window.iso = new Isotope( container, {
var container = document.querySelector('#basic');
var iso = window.iso = new Isotope( container, {
layoutMode: 'fitRows'
});
});
</script>

20
sandbox/bottom-up.html

@ -78,14 +78,9 @@
<div class="item"></div>
</div>
<script src="../bower_components/eventEmitter/EventEmitter.js"></script>
<script src="../bower_components/eventEmitter/EventEmitter.min.js"></script>
<script src="../bower_components/eventie/eventie.js"></script>
<script src="../bower_components/doc-ready/doc-ready.js"></script>
<script src="../bower_components/get-style-property/get-style-property.js"></script>
<script src="../bower_components/ev-emitter/ev-emitter.js"></script>
<script src="../bower_components/get-size/get-size.js"></script>
<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script>
<script src="../bower_components/matches-selector/matches-selector.js"></script>
<script src="../bower_components/desandro-matches-selector/matches-selector.js"></script>
<script src="../bower_components/fizzy-ui-utils/utils.js"></script>
<script src="../bower_components/outlayer/item.js"></script>
<script src="../bower_components/outlayer/outlayer.js"></script>
@ -98,8 +93,7 @@
<script src="../js/layout-modes/fit-rows.js"></script>
<script>
docReady( function() {
( function() {
( function() {
var container = document.querySelector('#basic');
var iso = new Isotope( container, {
isOriginTop: false,
@ -107,9 +101,9 @@ docReady( function() {
columnWidth: 60
}
});
})();
})();
( function() {
( function() {
var container = document.querySelector('#stamped');
var iso = new Isotope( container, {
itemSelector: '.item',
@ -120,9 +114,7 @@ docReady( function() {
},
stamp: '.stamp'
});
})();
});
})();
</script>
</body>

9
sandbox/cells-by-row.html

@ -144,13 +144,10 @@
</div>
</div>
<script src="../bower_components/eventEmitter/EventEmitter.js"></script>
<script src="../bower_components/eventie/eventie.js"></script>
<script src="../bower_components/doc-ready/doc-ready.js"></script>
<script src="../bower_components/get-style-property/get-style-property.js"></script>
<script src="../bower_components/ev-emitter/ev-emitter.js"></script>
<script src="../bower_components/get-size/get-size.js"></script>
<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script>
<script src="../bower_components/matches-selector/matches-selector.js"></script>
<script src="../bower_components/jquery-bridget/jquery-bridget.js"></script>
<script src="../bower_components/desandro-matches-selector/matches-selector.js"></script>
<script src="../bower_components/fizzy-ui-utils/utils.js"></script>
<script src="../bower_components/outlayer/item.js"></script>
<script src="../bower_components/outlayer/outlayer.js"></script>

9
sandbox/combination-filters-inclusive.html

@ -198,13 +198,10 @@
<script src="../bower_components/jquery/dist/jquery.js"></script>
<script src="../bower_components/eventEmitter/EventEmitter.js"></script>
<script src="../bower_components/eventie/eventie.js"></script>
<script src="../bower_components/doc-ready/doc-ready.js"></script>
<script src="../bower_components/get-style-property/get-style-property.js"></script>
<script src="../bower_components/ev-emitter/ev-emitter.js"></script>
<script src="../bower_components/get-size/get-size.js"></script>
<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script>
<script src="../bower_components/matches-selector/matches-selector.js"></script>
<script src="../bower_components/jquery-bridget/jquery-bridget.js"></script>
<script src="../bower_components/desandro-matches-selector/matches-selector.js"></script>
<script src="../bower_components/fizzy-ui-utils/utils.js"></script>
<script src="../bower_components/outlayer/item.js"></script>
<script src="../bower_components/outlayer/outlayer.js"></script>

14
sandbox/combination-filters.html

@ -198,13 +198,10 @@
<script src="../bower_components/jquery/dist/jquery.js"></script>
<script src="../bower_components/eventEmitter/EventEmitter.js"></script>
<script src="../bower_components/eventie/eventie.js"></script>
<script src="../bower_components/doc-ready/doc-ready.js"></script>
<script src="../bower_components/get-style-property/get-style-property.js"></script>
<script src="../bower_components/ev-emitter/ev-emitter.js"></script>
<script src="../bower_components/get-size/get-size.js"></script>
<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script>
<script src="../bower_components/matches-selector/matches-selector.js"></script>
<script src="../bower_components/jquery-bridget/jquery-bridget.js"></script>
<script src="../bower_components/desandro-matches-selector/matches-selector.js"></script>
<script src="../bower_components/fizzy-ui-utils/utils.js"></script>
<script src="../bower_components/outlayer/item.js"></script>
<script src="../bower_components/outlayer/outlayer.js"></script>
@ -233,6 +230,7 @@ $( function() {
var filterGroup = $buttonGroup.attr('data-filter-group');
// set filter for group
filters[ filterGroup ] = $this.attr('data-filter');
// combine filters
var filterValue = '';
for ( var prop in filters ) {
@ -245,9 +243,9 @@ $( function() {
// change is-checked class on buttons
$('.button-group').each( function( i, buttonGroup ) {
var $buttonGroup = $( buttonGroup );
$buttonGroup.on( 'click', 'button', function() {
$buttonGroup.on( 'click', 'button', function( event ) {
$buttonGroup.find('.is-checked').removeClass('is-checked');
$( this ).addClass('is-checked');
$( event.currentTarget ).addClass('is-checked');
});
});

48
sandbox/filter-sort.html

@ -141,13 +141,9 @@
</div>
</div>
<script src="../bower_components/eventEmitter/EventEmitter.js"></script>
<script src="../bower_components/eventie/eventie.js"></script>
<script src="../bower_components/doc-ready/doc-ready.js"></script>
<script src="../bower_components/get-style-property/get-style-property.js"></script>
<script src="../bower_components/ev-emitter/ev-emitter.js"></script>
<script src="../bower_components/get-size/get-size.js"></script>
<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script>
<script src="../bower_components/matches-selector/matches-selector.js"></script>
<script src="../bower_components/desandro-matches-selector/matches-selector.js"></script>
<script src="../bower_components/fizzy-ui-utils/utils.js"></script>
<script src="../bower_components/outlayer/item.js"></script>
<script src="../bower_components/outlayer/outlayer.js"></script>
@ -161,9 +157,9 @@
<script src="../bower_components/isotope-cells-by-row/cells-by-row.js"></script>
<script>
docReady( function() {
var container = document.querySelector('#container');
var iso = window.iso = new Isotope( container, {
var container = document.querySelector('#container');
var iso = window.iso = new Isotope( container, {
layoutMode: 'fitRows',
transitionDuration: '0.8s',
cellsByRow: {
@ -180,11 +176,11 @@ docReady( function() {
return parseFloat( getText( itemElem.querySelector('.weight') ).replace( /[\(\)]/g, '') );
}
}
});
});
var options = document.querySelector('#options');
var options = document.querySelector('#options');
eventie.bind( options, 'click', function( event ) {
options.addEventListener( 'click', function( event ) {
if ( !matchesSelector( event.target, 'button' ) ) {
return;
}
@ -195,32 +191,26 @@ docReady( function() {
if ( key === 'filter' && value === 'number-greater-than-50' ) {
value = function( elem ) {
var numberText = getText( elem.querySelector('.number') );
var numberText = elem.querySelector('.number').textContent;
return parseInt( numberText, 10 ) > 40;
};
}
// console.log( key, value );
iso.options[ key ] = value;
iso.arrange();
});
// iso.on( 'hideComplete', function( items ) {
// console.log( 'hideComplete', items );
// })
// iso.on( 'revealComplete', function( items ) {
// console.log( 'revealComplete', items );
// })
});
// iso.on( 'arrangeComplete', function( items ) {
// console.log( 'arrangeComplete', items.length );
// });
// iso.on( 'hideComplete', function( items ) {
// console.log( 'hideComplete', items );
// })
});
// iso.on( 'revealComplete', function( items ) {
// console.log( 'revealComplete', items );
// })
function getText( elem ) {
return elem.textContent || elem.innerText;
}
// iso.on( 'arrangeComplete', function( items ) {
// console.log( 'arrangeComplete', items.length );
// });
</script>

29
sandbox/fitrows.html

@ -89,13 +89,9 @@
<div class="item"></div>
</div>
<script src="../bower_components/eventEmitter/EventEmitter.js"></script>
<script src="../bower_components/eventie/eventie.js"></script>
<script src="../bower_components/doc-ready/doc-ready.js"></script>
<script src="../bower_components/get-style-property/get-style-property.js"></script>
<script src="../bower_components/ev-emitter/ev-emitter.js"></script>
<script src="../bower_components/get-size/get-size.js"></script>
<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script>
<script src="../bower_components/matches-selector/matches-selector.js"></script>
<script src="../bower_components/desandro-matches-selector/matches-selector.js"></script>
<script src="../bower_components/fizzy-ui-utils/utils.js"></script>
<script src="../bower_components/outlayer/item.js"></script>
<script src="../bower_components/outlayer/outlayer.js"></script>
@ -106,30 +102,29 @@
<script src="../js/layout-modes/fit-rows.js"></script>
<script>
docReady( function() {
var container = document.querySelector('#basic');
var iso = window.iso = new Isotope( container, {
var container = document.querySelector('#basic');
var iso = window.iso = new Isotope( container, {
layoutMode: 'fitRows'
});
});
// gutter with explicit value
new Isotope( '#gutter1', {
// gutter with explicit value
new Isotope( '#gutter1', {
layoutMode: 'fitRows',
fitRows: {
gutter: 20
}
});
});
// gutter with element sizing
new Isotope( '#gutter2', {
// gutter with element sizing
new Isotope( '#gutter2', {
itemSelector: '.item',
layoutMode: 'fitRows',
fitRows: {
gutter: '.gutter-sizer'
}
});
});
</script>
</body>

12
sandbox/fluid.html

@ -54,13 +54,9 @@
<div class="item"></div>
</div>
<script src="../bower_components/eventEmitter/EventEmitter.js"></script>
<script src="../bower_components/eventie/eventie.js"></script>
<script src="../bower_components/doc-ready/doc-ready.js"></script>
<script src="../bower_components/get-style-property/get-style-property.js"></script>
<script src="../bower_components/ev-emitter/ev-emitter.js"></script>
<script src="../bower_components/get-size/get-size.js"></script>
<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script>
<script src="../bower_components/matches-selector/matches-selector.js"></script>
<script src="../bower_components/desandro-matches-selector/matches-selector.js"></script>
<script src="../bower_components/fizzy-ui-utils/utils.js"></script>
<script src="../bower_components/outlayer/item.js"></script>
<script src="../bower_components/outlayer/outlayer.js"></script>
@ -73,14 +69,12 @@
<script src="../js/layout-modes/masonry.js"></script>
<script>
docReady( function() {
var iso = window.iso = new Isotope( '.container', {
var iso = new Isotope( '.container', {
itemSelector: '.item',
percentPosition: true,
masonry: {
columnWidth: '.grid-sizer'
}
});
});
</script>

9
sandbox/horizontal-layout-modes.html

@ -147,13 +147,10 @@
</div>
</div>
<script src="../bower_components/eventEmitter/EventEmitter.js"></script>
<script src="../bower_components/eventie/eventie.js"></script>
<script src="../bower_components/doc-ready/doc-ready.js"></script>
<script src="../bower_components/get-style-property/get-style-property.js"></script>
<script src="../bower_components/ev-emitter/ev-emitter.js"></script>
<script src="../bower_components/get-size/get-size.js"></script>
<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script>
<script src="../bower_components/matches-selector/matches-selector.js"></script>
<script src="../bower_components/jquery-bridget/jquery-bridget.js"></script>
<script src="../bower_components/desandro-matches-selector/matches-selector.js"></script>
<script src="../bower_components/fizzy-ui-utils/utils.js"></script>
<script src="../bower_components/outlayer/item.js"></script>
<script src="../bower_components/outlayer/outlayer.js"></script>

54
sandbox/insert.html

@ -30,13 +30,9 @@
<div class="item"><b>55</b></div>
</div>
<script src="../bower_components/eventEmitter/EventEmitter.js"></script>
<script src="../bower_components/eventie/eventie.js"></script>
<script src="../bower_components/doc-ready/doc-ready.js"></script>
<script src="../bower_components/get-style-property/get-style-property.js"></script>
<script src="../bower_components/ev-emitter/ev-emitter.js"></script>
<script src="../bower_components/get-size/get-size.js"></script>
<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script>
<script src="../bower_components/matches-selector/matches-selector.js"></script>
<script src="../bower_components/desandro-matches-selector/matches-selector.js"></script>
<script src="../bower_components/fizzy-ui-utils/utils.js"></script>
<script src="../bower_components/outlayer/item.js"></script>
<script src="../bower_components/outlayer/outlayer.js"></script>
@ -50,10 +46,8 @@
<script>
docReady( function() {
var container = document.querySelector('#container');
var iso = new Isotope( container, {
var container = document.querySelector('#container');
var iso = new Isotope( container, {
layoutMode: 'masonry',
transitionDuration: '0.8s',
getSortData: {
@ -62,56 +56,44 @@ docReady( function() {
sortBy: 'b',
// filter b greater than 40
filter: function( elem ) {
return parseInt( getText( elem.querySelector('b') ), 10 ) > 40
return parseInt( elem.querySelector('b').textContent, 10 ) > 40
}
});
});
eventie.bind( document.querySelector('#prepend'), 'click', function() {
document.querySelector('#prepend').addEventListener( 'click', function() {
// prepend 3 new items
iso.prepended( [ prependItem(), prependItem(), prependItem() ] );
});
});
eventie.bind( document.querySelector('#insert'), 'click', function() {
document.querySelector('#insert').addEventListener( 'click', function() {
// insert 3 new items
iso.insert( [ getItem(), getItem(), getItem() ] );
});
});
eventie.bind( document.querySelector('#append'), 'click', function() {
document.querySelector('#append').addEventListener( 'click', function() {
// append 3 new items
iso.appended( [ appendItem(), appendItem(), appendItem() ] );
});
});
function getItem() {
function getItem() {
var item = document.createElement('div');
item.className = 'item';
var num = Math.floor( Math.random() * 100 );
item.innerHTML = '<b>' + num + '</b>';
return item;
}
}
function prependItem() {
function prependItem() {
var item = getItem();
container.insertBefore( item, container.firstChild );
return item;
}
}
function appendItem() {
function appendItem() {
var item = getItem();
container.appendChild( item );
return item;
}
});
var docElem = document.documentElement;
var getText = docElem.textContent ?
function( elem ) {
return elem.textContent;
} :
function( elem ) {
return elem.innerText;
};
}
</script>

11
sandbox/jquery.html

@ -143,15 +143,12 @@
</div>
<script src="../bower_components/jquery/dist/jquery.js"></script>
<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script>
<script src="../bower_components/jquery-bridget/jquery-bridget.js"></script>
<script src="../bower_components/eventEmitter/EventEmitter.js"></script>
<script src="../bower_components/eventie/eventie.js"></script>
<script src="../bower_components/doc-ready/doc-ready.js"></script>
<script src="../bower_components/get-style-property/get-style-property.js"></script>
<script src="../bower_components/ev-emitter/ev-emitter.js"></script>
<script src="../bower_components/get-size/get-size.js"></script>
<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script>
<script src="../bower_components/matches-selector/matches-selector.js"></script>
<script src="../bower_components/jquery-bridget/jquery-bridget.js"></script>
<script src="../bower_components/desandro-matches-selector/matches-selector.js"></script>
<script src="../bower_components/fizzy-ui-utils/utils.js"></script>
<script src="../bower_components/outlayer/item.js"></script>
<script src="../bower_components/outlayer/outlayer.js"></script>

4
sandbox/js/require-js.js

@ -43,7 +43,7 @@ requirejs.config({
requirejs( [
'jquery',
'isotope/js/isotope',
'jquery-bridget/jquery.bridget'
'jquery-bridget/jquery-bridget'
],
function( $, Isotope ) {
$.bridget( 'isotope', Isotope );
@ -68,7 +68,7 @@ requirejs.config({
requirejs( [ 'require', 'jquery', '../dist/isotope.pkgd.js' ],
function( require, $, Isotope ) {
require( [
'jquery-bridget/jquery.bridget'
'jquery-bridget/jquery-bridget'
],
function() {
$.bridget( 'isotope', Isotope );

9
sandbox/masonry-horizontal.html

@ -176,13 +176,10 @@
</div>
</div>
<script src="../bower_components/eventEmitter/EventEmitter.js"></script>
<script src="../bower_components/eventie/eventie.js"></script>
<script src="../bower_components/doc-ready/doc-ready.js"></script>
<script src="../bower_components/get-style-property/get-style-property.js"></script>
<script src="../bower_components/ev-emitter/ev-emitter.js"></script>
<script src="../bower_components/get-size/get-size.js"></script>
<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script>
<script src="../bower_components/matches-selector/matches-selector.js"></script>
<script src="../bower_components/jquery-bridget/jquery-bridget.js"></script>
<script src="../bower_components/desandro-matches-selector/matches-selector.js"></script>
<script src="../bower_components/fizzy-ui-utils/utils.js"></script>
<script src="../bower_components/outlayer/item.js"></script>
<script src="../bower_components/outlayer/outlayer.js"></script>

31
sandbox/masonry.html

@ -145,13 +145,9 @@
</div>
</div>
<script src="../bower_components/eventEmitter/EventEmitter.js"></script>
<script src="../bower_components/eventie/eventie.js"></script>
<script src="../bower_components/doc-ready/doc-ready.js"></script>
<script src="../bower_components/get-style-property/get-style-property.js"></script>
<script src="../bower_components/ev-emitter/ev-emitter.js"></script>
<script src="../bower_components/get-size/get-size.js"></script>
<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script>
<script src="../bower_components/matches-selector/matches-selector.js"></script>
<script src="../bower_components/desandro-matches-selector/matches-selector.js"></script>
<script src="../bower_components/fizzy-ui-utils/utils.js"></script>
<script src="../bower_components/outlayer/item.js"></script>
<script src="../bower_components/outlayer/outlayer.js"></script>
@ -164,9 +160,9 @@
<script src="../js/layout-modes/fit-rows.js"></script>
<script>
docReady( function() {
var container = document.querySelector('#container');
var iso = window.iso = new Isotope( container, {
var container = document.querySelector('#container');
var iso = window.iso = new Isotope( container, {
// sortBy: 'symbol',
// filter: '.metal',
layoutMode: 'masonry',
@ -184,28 +180,21 @@ docReady( function() {
weight: function( itemElem ) {
// remove parenthesis
return parseFloat( getText( itemElem.querySelector('.weight') ).replace( /[\(\)]/g, '') );
var weight = itemElem.querySelector('.weight').textContent;
return parseFloat( weight.replace( /[\(\)]/g, '') );
}
}
});
var options = document.querySelector('#options');
});
eventie.bind( options, 'click', function( event ) {
var options = document.querySelector('#options');
options.addEventListener( 'click', function( event ) {
if ( !matchesSelector( event.target, 'button' ) ) {
return;
}
var sortBy = event.target.getAttribute('data-sort-by');
iso.arrange({ sortBy: sortBy });
});
});
function getText( elem ) {
return elem.textContent || elem.innerText;
}
</script>
</body>

20
sandbox/right-to-left.html

@ -79,13 +79,9 @@
<div class="item"></div>
</div>
<script src="../bower_components/eventEmitter/EventEmitter.js"></script>
<script src="../bower_components/eventie/eventie.js"></script>
<script src="../bower_components/doc-ready/doc-ready.js"></script>
<script src="../bower_components/get-style-property/get-style-property.js"></script>
<script src="../bower_components/ev-emitter/ev-emitter.js"></script>
<script src="../bower_components/get-size/get-size.js"></script>
<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script>
<script src="../bower_components/matches-selector/matches-selector.js"></script>
<script src="../bower_components/desandro-matches-selector/matches-selector.js"></script>
<script src="../bower_components/fizzy-ui-utils/utils.js"></script>
<script src="../bower_components/outlayer/item.js"></script>
<script src="../bower_components/outlayer/outlayer.js"></script>
@ -97,8 +93,8 @@
<script src="../js/layout-modes/masonry.js"></script>
<script>
docReady( function() {
( function() {
( function() {
var container = document.querySelector('#basic');
var iso = new Isotope( container, {
isOriginLeft: false,
@ -106,9 +102,9 @@ docReady( function() {
columnWidth: 60
}
});
})();
})();
( function() {
( function() {
var container = document.querySelector('#stamped');
var msnry = new Isotope( container, {
itemSelector: '.item',
@ -119,9 +115,7 @@ docReady( function() {
columnWidth: 60,
}
});
})();
});
})();
</script>
</body>

35
sandbox/sorting.html

@ -132,13 +132,10 @@
</div>
</div>
<script src="../bower_components/eventEmitter/EventEmitter.js"></script>
<script src="../bower_components/eventie/eventie.js"></script>
<script src="../bower_components/doc-ready/doc-ready.js"></script>
<script src="../bower_components/get-style-property/get-style-property.js"></script>
<script src="../bower_components/ev-emitter/ev-emitter.js"></script>
<script src="../bower_components/get-size/get-size.js"></script>
<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script>
<script src="../bower_components/matches-selector/matches-selector.js"></script>
<script src="../bower_components/jquery-bridget/jquery-bridget.js"></script>
<script src="../bower_components/desandro-matches-selector/matches-selector.js"></script>
<script src="../bower_components/fizzy-ui-utils/utils.js"></script>
<script src="../bower_components/outlayer/item.js"></script>
<script src="../bower_components/outlayer/outlayer.js"></script>
@ -149,9 +146,9 @@
<script src="../js/layout-modes/fit-rows.js"></script>
<script>
docReady( function() {
var container = document.querySelector('#container');
var iso = window.iso = new Isotope( container, {
var container = document.querySelector('#container');
var iso = window.iso = new Isotope( container, {
layoutMode: 'fitRows',
getSortData: {
// number: function( itemElem ) {
@ -174,16 +171,15 @@ docReady( function() {
weight: function( itemElem ) {
// remove parenthesis
return parseFloat( getText( itemElem.querySelector('.weight') ).replace( /[\(\)]/g, '') );
var weight = itemElem.querySelector('.weight').textContent;
return parseFloat( weight.replace( /[\(\)]/g, '') );
}
}
});
});
var options = document.querySelector('#options');
var options = document.querySelector('#options');
eventie.bind( options, 'click', function( event ) {
options.addEventListener( 'click', function( event ) {
if ( !matchesSelector( event.target, 'a' ) ) {
return;
}
@ -194,18 +190,9 @@ docReady( function() {
iso.options.sortBy = sortBy;
iso.arrange();
event.preventDefault();
});
});
function getText( elem ) {
return elem.textContent || elem.innerText;
}
</script>
</body>
</html>

26
sandbox/stamps.html

@ -83,12 +83,9 @@
<div class="item"></div>
</div>
<script src="../bower_components/eventEmitter/EventEmitter.js"></script>
<script src="../bower_components/eventie/eventie.js"></script>
<script src="../bower_components/doc-ready/doc-ready.js"></script>
<script src="../bower_components/get-style-property/get-style-property.js"></script>
<script src="../bower_components/ev-emitter/ev-emitter.js"></script>
<script src="../bower_components/get-size/get-size.js"></script>
<script src="../bower_components/matches-selector/matches-selector.js"></script>
<script src="../bower_components/desandro-matches-selector/matches-selector.js"></script>
<script src="../bower_components/fizzy-ui-utils/utils.js"></script>
<script src="../bower_components/outlayer/item.js"></script>
<script src="../bower_components/outlayer/outlayer.js"></script>
@ -100,33 +97,24 @@
<script src="../js/layout-modes/masonry.js"></script>
<script>
docReady( function() {
( function() {
var container = document.querySelector('#alpha');
var iso = new Isotope( container, {
var alphaIso = new Isotope( '#alpha', {
itemSelector: '.item',
stamp: '.stamp',
masonry: {
columnWidth: 60,
gutter: 10
}
});
})();
});
( function() {
var container = document.querySelector('#beta');
var iso = new Isotope( container, {
var betaIso = new Isotope( '#beta', {
stamp: '.stamp',
masonry: {
columnWidth: 60,
gutter: 10
}
});
})();
});
</script>
</body>

19
sandbox/transition-bug.html

@ -35,13 +35,10 @@
</div>
</div>
<script src="../bower_components/eventEmitter/EventEmitter.js"></script>
<script src="../bower_components/eventie/eventie.js"></script>
<script src="../bower_components/doc-ready/doc-ready.js"></script>
<script src="../bower_components/get-style-property/get-style-property.js"></script>
<script src="../bower_components/ev-emitter/ev-emitter.js"></script>
<script src="../bower_components/get-size/get-size.js"></script>
<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script>
<script src="../bower_components/matches-selector/matches-selector.js"></script>
<script src="../bower_components/jquery-bridget/jquery-bridget.js"></script>
<script src="../bower_components/desandro-matches-selector/matches-selector.js"></script>
<script src="../bower_components/fizzy-ui-utils/utils.js"></script>
<script src="../bower_components/outlayer/item.js"></script>
<script src="../bower_components/outlayer/outlayer.js"></script>
@ -53,7 +50,7 @@
<script src="../js/layout-modes/vertical.js"></script>
<script>
docReady( function() {
var container = document.querySelector('#container');
var iso = window.iso = new Isotope( container, {
layoutMode: 'fitRows',
@ -63,7 +60,7 @@ docReady( function() {
var item = iso.items[0];
var bugButton = document.querySelector('#bug-me');
eventie.bind( bugButton, 'click', function() {
bugButton.addEventListener( 'click', function() {
item.reveal();
item.moveTo( 200, 100 );
setTimeout( function() {
@ -71,12 +68,6 @@ docReady( function() {
}, 1500 );
});
});
function getText( elem ) {
return elem.textContent || elem.innerText;
}
</script>
</body>

2
test/filtering.js

@ -47,7 +47,7 @@ test( 'filtering', function() {
iso.arrange({
filter: function( elem ) {
var num = parseInt( getText( elem ), 10 );
var num = parseInt( elem.textContent, 10 );
return num > 5;
}
});

11
test/helpers.js

@ -5,15 +5,4 @@
// ----- default layout mode ----- //
Isotope.defaults.layoutMode = 'fitRows';
// ----- getText ----- //
var docElem = document.documentElement;
window.getText = docElem.textContent ?
function( elem ) {
return elem.textContent;
} :
function( elem ) {
return elem.innerText;
};
})();

9
test/index.html

@ -12,13 +12,10 @@
<script src="../bower_components/jquery/dist/jquery.js"></script>
<script src="../bower_components/eventEmitter/EventEmitter.js"></script>
<script src="../bower_components/eventie/eventie.js"></script>
<script src="../bower_components/doc-ready/doc-ready.js"></script>
<script src="../bower_components/get-style-property/get-style-property.js"></script>
<script src="../bower_components/ev-emitter/ev-emitter.js"></script>
<script src="../bower_components/get-size/get-size.js"></script>
<script src="../bower_components/jquery-bridget/jquery.bridget.js"></script>
<script src="../bower_components/matches-selector/matches-selector.js"></script>
<script src="../bower_components/jquery-bridget/jquery-bridget.js"></script>
<script src="../bower_components/desandro-matches-selector/matches-selector.js"></script>
<script src="../bower_components/fizzy-ui-utils/utils.js"></script>
<script src="../bower_components/outlayer/item.js"></script>
<script src="../bower_components/outlayer/outlayer.js"></script>

8
test/sorting.js

@ -3,11 +3,9 @@
'use strict';
function getItemsText( iso ) {
var texts = [];
for ( var i=0, len = iso.filteredItems.length; i < len; i++ ) {
var item = iso.filteredItems[i];
texts.push( getText( item.element ) );
}
var texts = iso.filteredItems.map( function( item ) {
return item.element.textContent;
})
return texts.join(',');
}

Loading…
Cancel
Save