From 59f09ac5a51b1d64d48086d75327c85adf3b56be Mon Sep 17 00:00:00 2001 From: pliablepixels Date: Sat, 4 Jun 2016 17:52:29 -0400 Subject: montage layout tweaks Former-commit-id: e905dd89733bcb98c0aebeea74a442589d02ce57 --- www/external/packery.pkgd.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'www/external') diff --git a/www/external/packery.pkgd.js b/www/external/packery.pkgd.js index f7edb5b0..a85a10f4 100644 --- a/www/external/packery.pkgd.js +++ b/www/external/packery.pkgd.js @@ -2752,7 +2752,8 @@ Packery.prototype.getShiftPositions = function( attrName ) { attr: item.element.getAttribute( attrName ), size: item.element.getAttribute ("data-item-size"), display: item.element.getAttribute ("data-item-listdisplay"), - x: item.rect.x / _this.packer.width + x: item.rect.x / _this.packer.width, + y: item.rect.y / _this.packer.height } }); }; @@ -2782,6 +2783,7 @@ Packery.prototype.initShiftLayout = function( positions, attr ) { var itemElem = this.element.querySelector( selector ); var item = this.getItem( itemElem ); item.rect.x = itemPosition.x * this.packer.width; + item.rect.y = itemPosition.y * this.packer.height; return item; }, this ); this.shiftLayout(); -- cgit v1.2.3