fix grid initialization
This commit is contained in:
parent
1ed21714b0
commit
16884fdf20
|
@ -310,6 +310,7 @@ Changes
|
|||
|
||||
#### v0.2.2 (current development version)
|
||||
|
||||
- fix grid initialization
|
||||
- add `cell_height`/`cell_width` API methods
|
||||
- fix boolean attributes (issue #31)
|
||||
|
||||
|
|
|
@ -352,8 +352,16 @@
|
|||
}, this.opts.float, this.opts.height);
|
||||
|
||||
if (this.opts.auto) {
|
||||
var elements = [];
|
||||
this.container.find('.' + this.opts.item_class).each(function (index, el) {
|
||||
self._prepare_element(el);
|
||||
el = $(el);
|
||||
elements.push({
|
||||
el: el,
|
||||
i: parseInt(el.attr('data-gs-x')) + parseInt(el.attr('data-gs-y')) * parseInt(el.attr('data-gs-width'))
|
||||
});
|
||||
});
|
||||
_.chain(elements).sortBy(function (x) { return x.i; }).each(function (i) {
|
||||
self._prepare_element(i.el);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue