Revert "Gallery: Switch Packery to MagicGrid "

This commit is contained in:
Nuno Coração
2024-03-09 14:28:04 +00:00
committed by GitHub
parent 08b14e923d
commit f0f6afa555
6 changed files with 68 additions and 71 deletions
+12 -10
View File
@@ -1,3 +1,11 @@
function _getDefaultPackeryOptions() {
return {
percentPosition: true,
gutter: 5,
resize: true
};
}
(function init() {
$(window).on("load", function () {
@@ -5,16 +13,10 @@
let nodeGalleries = document.querySelectorAll('.gallery');
nodeGalleries.forEach(nodeGallery => {
let magicGrid = new MagicGrid({
container: nodeGallery,
static: true,
gutter: 5,
animate: false,
});
magicGrid.listen();
magicGrids.push(magicGrid);
// TODO : implement a reader of Packery configuration _getPackeryOptions; for example by reading data-attribute
let packery = new Packery(nodeGallery, _getDefaultPackeryOptions());
packeries.push(packery);
});
console.log("Galleries founded and initialized with MagicGrid", magicGrids);
console.groupEnd();
});
})();
})();