Skip to content

Commit

Permalink
Merge 988f7e6 into 3e8381d
Browse files Browse the repository at this point in the history
  • Loading branch information
daybrush committed Jan 26, 2018
2 parents 3e8381d + 988f7e6 commit f78b71e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Binary file removed demo/assets/image/57.gif
Binary file not shown.
6 changes: 3 additions & 3 deletions src/layouts/GridLayout.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {APPEND, PREPEND, ALIGN} from "../consts";
import {getStyleNames, assignOptions} from "../utils";
import {getStyleNames, assignOptions, fill} from "../utils";

// ALIGN
const {START, CENTER, END, JUSTIFY} = ALIGN;
Expand Down Expand Up @@ -163,7 +163,7 @@ class GridLayout {
this.checkColumn(items[0]);
}
if (outline.length !== this._columnLength) {
startOutline = new Array(this._columnLength).fill(outline.length === 0 ? 0 : (Math[type === APPEND ? "min" : "max"](...outline) || 0));
startOutline = fill(new Array(this._columnLength), outline.length === 0 ? 0 : (Math[type === APPEND ? "min" : "max"](...outline) || 0));
}

const result = this._layout(clone, startOutline, type);
Expand Down Expand Up @@ -221,7 +221,7 @@ class GridLayout {
const pos = outline.length === 0 ? 0 : Math.min(...outline);

// re-layout items.
startOutline = new Array(this._columnLength).fill(pos);
startOutline = fill(new Array(this._columnLength), pos);
} else {
startOutline = outline.slice();
}
Expand Down

0 comments on commit f78b71e

Please sign in to comment.