packery

Center Container for JQuery Packery?

℡╲_俬逩灬. 提交于 2019-12-12 00:42:19
问题 I use JQuery Packery which works fine. The question that occurs to me is how can I center the item container on my page? <div id="container"> <div class="item">...</div> <div class="item w2">...</div> <div class="item">...</div> ... </div> I tried css: #container { marin: 0 auto; } but this does not work. 回答1: DeSandro already has an example of a centered packery layout. The example is here. Basically it is just centered via CSS. I'm copying the code here too: HTML: <h1>Packery - centered</h1

MeteorJS and Packery layout doesn't re-render when collection is updated

↘锁芯ラ 提交于 2019-12-07 10:31:18
问题 I'm integrating MeteorJS collection with Packer for a Pinterest-like interface. I'm having an issue that when a new item is added to the collection which is rendered by Packery (or Masonry, same issue), the new item just floats on top left of the container, and is not run through the Packery layout processor. triggerMasonryLayout = function () { var $container = $('#masonry-layout'); console.log("AUTORUN PACKERY", $container); $container.packery({ itemSelector: '.item', gutter: 20,

MeteorJS and Packery layout doesn't re-render when collection is updated

依然范特西╮ 提交于 2019-12-05 13:07:24
I'm integrating MeteorJS collection with Packer for a Pinterest-like interface. I'm having an issue that when a new item is added to the collection which is rendered by Packery (or Masonry, same issue), the new item just floats on top left of the container, and is not run through the Packery layout processor. triggerMasonryLayout = function () { var $container = $('#masonry-layout'); console.log("AUTORUN PACKERY", $container); $container.packery({ itemSelector: '.item', gutter: 20, columnWidth: 300 }); $container.packery(); } Template.bookingsProfileItem.onRendered( function() {

Angularjs with Packery.js

我的未来我决定 提交于 2019-12-04 09:46:13
问题 Trying to get Packery.js working with an angularjs app I'm working with. For some reason they don't seem to play nice together. I thought it might be resolved with the isInitLayout false setting however, still no love. Here is my (bootstrap 3) HTML: <div class="row" class="js-packery" data-packery-options='{ "itemSelector": ".packery-item", "gutter": 10, "columnWidth": 60, "isInitLayout": false }'> <artifact class="packery-item" ng-repeat="(index, thing) in data | limitObjectTo:4" thing=