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.
2 parents 310c854 + 5f2e795 commit ecebcc0Copy full SHA for ecebcc0
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