Permalink
Browse files

Remove overflow hidden from item

  • Loading branch information...
1 parent 53a2fd6 commit 91aaf1c0df9be328a34890c62a1fcdd3e830b8e1 @henriquea committed Nov 25, 2016
Showing with 11 additions and 15 deletions.
  1. +4 โˆ’0 CHANGELOG.md
  2. +2 โˆ’2 dist/minigrid.min.js
  3. +1 โˆ’1 package.json
  4. +3 โˆ’3 site/index.html
  5. +0 โˆ’7 site/index.md
  6. +1 โˆ’2 src/index.js
View
@@ -1,5 +1,9 @@
# CHANGELOG
+### v3.1.1
+
+- Remove `overflow: hidden` https://github.com/henriquea/minigrid/issues/60
+
### v3.1.0
- Add RTL support https://github.com/henriquea/minigrid/issues/59
@@ -1,2 +1,2 @@
-/* @license Minigrid v3.1.0 โ€“ minimal cascading grid layout http://alves.im/minigrid */
-!function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e():t.Minigrid=e()}(this,function(t){"use strict";function e(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}var i=function(t){var i=t.container instanceof Node?t.container:document.querySelector(t.container),r=t.item instanceof NodeList?t.item:i.querySelectorAll(t.item);this.props=e(t,{container:i,nodeList:r})};return i.prototype.mount=function(){if(!this.props.container)return!1;if(!this.props.nodeList||0===this.props.nodeList.length)return!1;var t="number"==typeof this.props.gutter&&isFinite(this.props.gutter)&&Math.floor(this.props.gutter)===this.props.gutter?this.props.gutter:0,e=this.props.done,i=this.props.container,r=this.props.nodeList;i.style.width="";var n=Array.prototype.forEach,o=i.getBoundingClientRect().width,s=r[0].getBoundingClientRect().width+t,p=Math.max(Math.floor((o-t)/s),1),a=0;o=s*p+t+"px",i.style.width=o,i.style.position="relative";for(var l=[],c=[],u=0;u<p;++u)c.push(u*s+t),l.push(t);this.props.rtl&&c.reverse(),n.call(r,function(e){var i=l.slice(0).sort(function(t,e){return t-e}).shift();i=l.indexOf(i);var r=parseInt(c[i]),n=parseInt(l[i]);e.style.position="absolute",e.style.overflow="hidden",e.style.webkitBackfaceVisibility=e.style.backfaceVisibility="hidden",e.style.transformStyle="preserve-3d",e.style.transform="translate3D("+r+"px,"+n+"px, 0)",l[i]+=e.getBoundingClientRect().height+t,a+=1}),i.style.display="";var f=l.slice(0).sort(function(t,e){return t-e}).pop();i.style.height=f+"px","function"==typeof e&&e(r)},i});
+/* @license Minigrid v3.1.1 โ€“ minimal cascading grid layout http://alves.im/minigrid */
+!function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e():t.Minigrid=e()}(this,function(t){"use strict";function e(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}var i=function(t){var i=t.container instanceof Node?t.container:document.querySelector(t.container),r=t.item instanceof NodeList?t.item:i.querySelectorAll(t.item);this.props=e(t,{container:i,nodeList:r})};return i.prototype.mount=function(){if(!this.props.container)return!1;if(!this.props.nodeList||0===this.props.nodeList.length)return!1;var t="number"==typeof this.props.gutter&&isFinite(this.props.gutter)&&Math.floor(this.props.gutter)===this.props.gutter?this.props.gutter:0,e=this.props.done,i=this.props.container,r=this.props.nodeList;i.style.width="";var n=Array.prototype.forEach,o=i.getBoundingClientRect().width,s=r[0].getBoundingClientRect().width+t,p=Math.max(Math.floor((o-t)/s),1),a=0;o=s*p+t+"px",i.style.width=o,i.style.position="relative";for(var c=[],u=[],l=0;l<p;++l)u.push(l*s+t),c.push(t);this.props.rtl&&u.reverse(),n.call(r,function(e){var i=c.slice(0).sort(function(t,e){return t-e}).shift();i=c.indexOf(i);var r=parseInt(u[i]),n=parseInt(c[i]);e.style.position="absolute",e.style.webkitBackfaceVisibility=e.style.backfaceVisibility="hidden",e.style.transformStyle="preserve-3d",e.style.transform="translate3D("+r+"px,"+n+"px, 0)",c[i]+=e.getBoundingClientRect().height+t,a+=1}),i.style.display="";var f=c.slice(0).sort(function(t,e){return t-e}).pop();i.style.height=f+"px","function"==typeof e&&e(r)},i});
View
@@ -1,6 +1,6 @@
{
"name": "minigrid",
- "version": "3.1.0",
+ "version": "3.1.1",
"description": "Minimal 2kb zero dependency cascading grid layout",
"main": "src/index.js",
"files": [
View
@@ -9,6 +9,6 @@
gutter: 6
});
grid.mount();
-</code></pre><h2>Props</h2><ul><li>container: <code>string</code> or <code>Node</code></li><li>item: <code>string</code> or <code>NodeList</code></li><li>gutter: <code>number</code></li><li>rtl: <code>boolean</code></li></ul><h2>Installation</h2><p>Get it from <strong>npm</strong>.</p><pre><code>npm install minigrid
-</code></pre><p>Or 1998 script tag from <a href="https://unpkg.com/minigrid@3.1.0/dist/minigrid.min.js">unpkg</a>:</p><pre><code>&lt;script src=&quot;https://unpkg.com/minigrid@3.1.0/dist/minigrid.min.js&quot;&gt;&lt;/script&gt;
-</code></pre><h2>Upgrade</h2><p>Upgrading from v1.x or v2.x?</p><p>Please read the <a href="https://github.com/henriquea/minigrid/blob/master/CHANGELOG.md">CHANGELOG</a> for API changes.</p><h2>Limitations</h2><p>Minigrid was built having in mind &quot;cards&quot; with same width and different heights. If your cards have different width sizes or you need more power I would recommend <a href="http://isotope.metafizzy.co/">Isotope</a>.</p><h2>Questions</h2><p>Open an <a href="https://github.com/henriquea/minigrid/issues">issue</a> or hit me on Twitter.</p><p><a href="https://twitter.com/share" class="twitter-share-button" data-url="http://alves.im/minigrid" data-text="Minimal 2kb zero dependencies cascading grid layout" data-via="healves82" data-hashtags="javascript">Tweet Project</a></p><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script><ul><li><a href="http://alves.im/minigrid">Minigrid</a> v3.1.0</li><li><a href="https://github.com/henriquea/minigrid">GitHub</a></li><li><a href="https://www.npmjs.com/package/minigrid">npm</a></li><li><a href="https://js.org"><img src="https://logo.js.org/dark_horz.png" width="55"></a></li></ul></div><script async defer="defer" id="github-bjs" src="https://buttons.github.io/buttons.js"></script><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script><script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-58573505-3', 'auto'); ga('send', 'pageview');</script></body></html>
+</code></pre><h2>Installation</h2><p>Get it from <strong>npm</strong>.</p><pre><code>npm install minigrid
+</code></pre><p>Or 1998 script tag from <a href="https://unpkg.com/minigrid@3.1.1/dist/minigrid.min.js">unpkg</a>:</p><pre><code>&lt;script src=&quot;https://unpkg.com/minigrid@3.1.1/dist/minigrid.min.js&quot;&gt;&lt;/script&gt;
+</code></pre><h2>Upgrade</h2><p>Upgrading from v1.x or v2.x?</p><p>Please read the <a href="https://github.com/henriquea/minigrid/blob/master/CHANGELOG.md">CHANGELOG</a> for API changes.</p><h2>Limitations</h2><p>Minigrid was built having in mind &quot;cards&quot; with same width and different heights. If your cards have different width sizes or you need more power I would recommend <a href="http://isotope.metafizzy.co/">Isotope</a>.</p><h2>Questions</h2><p>Open an <a href="https://github.com/henriquea/minigrid/issues">issue</a> or hit me on Twitter.</p><p><a href="https://twitter.com/share" class="twitter-share-button" data-url="http://alves.im/minigrid" data-text="Minimal 2kb zero dependencies cascading grid layout" data-via="healves82" data-hashtags="javascript">Tweet Project</a></p><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script><ul><li><a href="http://alves.im/minigrid">Minigrid</a> v3.1.1</li><li><a href="https://github.com/henriquea/minigrid">GitHub</a></li><li><a href="https://www.npmjs.com/package/minigrid">npm</a></li><li><a href="https://js.org"><img src="https://logo.js.org/dark_horz.png" width="55"></a></li></ul></div><script async defer="defer" id="github-bjs" src="https://buttons.github.io/buttons.js"></script><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script><script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-58573505-3', 'auto'); ga('send', 'pageview');</script></body></html>
View
@@ -36,13 +36,6 @@ var grid = new Minigrid({
grid.mount();
```
-## Props
-
-- container: `string` or `Node`
-- item: `string` or `NodeList`
-- gutter: `number`
-- rtl: `boolean`
-
## Installation
Get it from <strong>npm</strong>.
View
@@ -1,4 +1,4 @@
-/* @license Minigrid v3.1.0 โ€“ minimal cascading grid layout http://alves.im/minigrid */
+/* @license Minigrid v3.1.1 โ€“ minimal cascading grid layout http://alves.im/minigrid */
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define(factory);
@@ -92,7 +92,6 @@
var posY = parseInt(itemsGutter[itemIndex]);
item.style.position = 'absolute';
- item.style.overflow = 'hidden';
item.style.webkitBackfaceVisibility = item.style.backfaceVisibility = 'hidden';
item.style.transformStyle = 'preserve-3d';
item.style.transform = 'translate3D(' + posX + 'px,' + posY + 'px, 0)';

0 comments on commit 91aaf1c

Please sign in to comment.