diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2016-10-11 16:15:06 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2016-10-11 16:15:06 -0400 |
| commit | 0202d7298986ab02cb1571751d7261ab8afc5f42 (patch) | |
| tree | eb3d2655dad0e559912897d430d119d09f4ad373 /www/external | |
| parent | eaa579a83719520d73d8a316ef6af9450bd59129 (diff) | |
removed my ceil hack, added PR hack for round
Former-commit-id: f470f17b8c96ea755d2551d925209e448506a70b
Diffstat (limited to 'www/external')
| -rw-r--r-- | www/external/packery.pkgd.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/www/external/packery.pkgd.js b/www/external/packery.pkgd.js index 86cb6932..7576576b 100644 --- a/www/external/packery.pkgd.js +++ b/www/external/packery.pkgd.js @@ -285,7 +285,8 @@ function setup() { body.appendChild( div ); var style = getStyle( div ); - getSize.isBoxSizeOuter = isBoxSizeOuter = getStyleSize( style.width ) == 200; + //PP https://github.com/metafizzy/packery/pull/382/commits/ea595864bfc161e992bcb28cbce132df9eac57b9 + getSize.isBoxSizeOuter = isBoxSizeOuter = Math.round(getStyleSize( style.width )) == 200; body.removeChild( div ); } @@ -2797,8 +2798,8 @@ 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 = Math.ceil(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; |
