Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 310c854 commit 5f2e795Copy full SHA for 5f2e795
src/gridstack.js
@@ -429,11 +429,12 @@
429
430
if (this.opts.auto) {
431
var elements = [];
432
+ var _this = this;
433
this.container.children('.' + this.opts.item_class).each(function (index, el) {
434
el = $(el);
435
elements.push({
436
el: el,
- i: parseInt(el.attr('data-gs-x')) + parseInt(el.attr('data-gs-y')) * parseInt(el.attr('data-gs-width'))
437
+ i: parseInt(el.attr('data-gs-x')) + parseInt(el.attr('data-gs-y')) * _this.opts.width // Use opts.width as weight for Y
438
});
439
440
_.chain(elements).sortBy(function (x) { return x.i; }).each(function (i) {
0 commit comments