Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix getMin for support IE #36

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[![MIT License](https://img.shields.io/npm/l/magic-grid.svg?style=for-the-badge)](https://www.npmjs.com/package/magic-grid)
[![Version](https://img.shields.io/npm/v/magic-grid.svg?style=for-the-badge)](https://www.npmjs.com/package/magic-grid)
[![Downloads](https://img.shields.io/npm/dt/magic-grid.svg?style=for-the-badge)](https://www.npmjs.com/package/magic-grid)

# Magic Grid [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Magic%20Grid%20-%20A%20simple,%20lightweight%20Javascript%20library%20for%20dynamic%20grid%20layouts.&url=https://github.com/e-oj/Magic-Grid&hashtags=MagicGrid,GridLayout,JS)
## A simple, lightweight Javascript library for dynamic grid layouts.
Expand Down Expand Up @@ -116,7 +117,7 @@ let magicGrid = new MagicGrid({
gutter: 30, // Optional. Space between items. Default: 25(px).
maxColumns: 5, // Optional. Maximum number of columns. Default: Infinite.
useMin: true, // Optional. Prioritize shorter columns when positioning items. Default: false.
useTransform: true // Optional. Position items using CSS transform. Default: True.
useTransform: true, // Optional. Position items using CSS transform. Default: True.
animate: true, // Optional. Animate item positioning. Default: false.
});
```
Expand Down
4 changes: 2 additions & 2 deletions dist/magic-grid.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ var error = function (prop) {
var getMin = function (cols) {
var min = cols[0];

for (var col of cols) {
if (col.height < min.height) { min = col; }
for (var i = 0; i < cols.length; i++) {
if (cols[i].height < min.height) { min = cols[i]; }
}

return min;
Expand Down
4 changes: 2 additions & 2 deletions dist/magic-grid.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ var error = function (prop) {
var getMin = function (cols) {
var min = cols[0];

for (var col of cols) {
if (col.height < min.height) { min = col; }
for (var i = 0; i < cols.length; i++) {
if (cols[i].height < min.height) { min = cols[i]; }
}

return min;
Expand Down
2 changes: 1 addition & 1 deletion dist/magic-grid.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ const error = prop => {
const getMin = cols => {
let min = cols[0];

for (let col of cols) {
if (col.height < min.height) min = col;
for (let i = 0; i < cols.length; i++) {
if (cols[i].height < min.height) min = cols[i];
}

return min;
Expand Down