mirror of https://github.com/metafizzy/isotope
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.
58 lines
1.1 KiB
58 lines
1.1 KiB
( function() { |
|
|
|
'use strict'; |
|
|
|
test( 'stamp top left', function() { |
|
|
|
var container = document.querySelector('#stamp-top-left'); |
|
var msnry = new Masonry( container, { |
|
itemSelector: '.item', |
|
stamp: '.stamp' |
|
}); |
|
|
|
checkItemPositions( msnry, { |
|
0: { left: 0, top: 20 }, |
|
1: { left: 135, top: 20 }, |
|
2: { left: 45, top: 40 }, |
|
3: { left: 90, top: 40 } |
|
}); |
|
|
|
}); |
|
|
|
test( 'stamp top left', function() { |
|
|
|
var container = document.querySelector('#stamp-top-left'); |
|
var msnry = new Masonry( container, { |
|
itemSelector: '.item', |
|
stamp: '.stamp' |
|
}); |
|
|
|
checkItemPositions( msnry, { |
|
0: { left: 0, top: 20 }, |
|
1: { left: 135, top: 20 }, |
|
2: { left: 45, top: 40 }, |
|
3: { left: 90, top: 40 } |
|
}); |
|
|
|
}); |
|
|
|
test( 'stamp bottom right', function() { |
|
|
|
var container = document.querySelector('#stamp-bottom-right'); |
|
var msnry = new Masonry( container, { |
|
itemSelector: '.item', |
|
stamp: '.stamp', |
|
isOriginLeft: false, |
|
isOriginTop: false |
|
}); |
|
|
|
checkItemPositions( msnry, { |
|
0: { right: 0, bottom: 20 }, |
|
1: { right: 135, bottom: 20 }, |
|
2: { right: 45, bottom: 40 }, |
|
3: { right: 90, bottom: 40 } |
|
}); |
|
|
|
}); |
|
|
|
})(); |