summaryrefslogtreecommitdiff
path: root/www/external
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2016-10-05 14:28:58 -0400
committerPliable Pixels <pliablepixels@gmail.com>2016-10-05 14:28:58 -0400
commitaa399523b29bb1cdbff9ed082dd919409bb0e30f (patch)
tree97132eb433a73c2c18bbda22e323944ef8206f0b /www/external
parent43eaa42c6708c2d1280b94e09f91bcbf819fbbd3 (diff)
tweaks to packery
Former-commit-id: ee6a0147819ee24195b8be8b6d58ac177c617ef1
Diffstat (limited to 'www/external')
-rw-r--r--www/external/packery.pkgd.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/www/external/packery.pkgd.js b/www/external/packery.pkgd.js
index 66c3b21f..86cb6932 100644
--- a/www/external/packery.pkgd.js
+++ b/www/external/packery.pkgd.js
@@ -2748,6 +2748,7 @@ Packery.prototype.getShiftPositions = function( attrName ) {
attrName = attrName || 'id';
var _this = this;
return this.items.map( function( item ) {
+ //console.log ("x for "+item.element.getAttribute(attrName)+" is " + item.rect.x);
return {
attr: item.element.getAttribute( attrName ),
size: item.element.getAttribute ("data-item-size"),
@@ -2796,8 +2797,10 @@ Packery.prototype.initShiftLayout = function( positions, attr ) {
var selector = '[' + attr + '="' + itemPosition.attr + '"]'
var itemElem = this.element.querySelector( selector );
var item = this.getItem( itemElem );
- item.rect.x = itemPosition.x * this.packer.width;
+ //item.rect.x = itemPosition.x * this.packer.width;
+ item.rect.x = Math.ceil(itemPosition.x * this.packer.width);
item.rect.y = itemPosition.y * this.packer.height;
+ //console.log ("X computed as " + item.rect.x);
return item;
}, this );
this.shiftLayout();