Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3e672c9

Browse files
committed
fix css rules generation
1 parent d59bdab commit 3e672c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/gridstack.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,9 @@
291291
for (var i = self._styles._max; i < max_height; ++i) {
292292
var css;
293293
css = '.' + self.opts._class + ' .' + self.opts.item_class + '[data-gs-height="' + (i + 1) + '"] { height: ' + (self.opts.cell_height * (i + 1) + self.opts.vertical_margin * i) + 'px; }';
294-
self._styles.insertRule(css);
294+
self._styles.insertRule(css, i);
295295
css = '.' + self.opts._class + ' .' + self.opts.item_class + '[data-gs-y="' + (i) + '"] { top: ' + (self.opts.cell_height * i + self.opts.vertical_margin * i) + 'px; }';
296-
self._styles.insertRule(css);
296+
self._styles.insertRule(css, i);
297297
}
298298
self._styles._max = max_height;
299299
}

0 commit comments

Comments
 (0)