Skip to content

Commit 39fa547

Browse files
authored
Merge pull request #2817 from adumesny/master
don't write out gs-auto-position
2 parents 67d08c6 + bcdfb1a commit 39fa547

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

doc/README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -522,10 +522,9 @@ Used to add a subgrid into an existing grid.
522522
const grid = Gridstack.init()
523523
grid.el.appendChild(`
524524
<div id="gsi-1" gs-x="0" gs-y="0" gs-w="3" gs-h="2" gs-auto-position="true">
525-
<div class="grid-stack" id="nested-grid">
526-
<div id="gsi-2" gs-x="0" gs-y="0" gs-w="3" gs-h="2" gs-auto-position="true">
527-
</div>
528-
</div>
525+
<div class="grid-stack" id="nested-grid">
526+
<div id="gsi-2" gs-x="0" gs-y="0" gs-w="3" gs-h="2" gs-auto-position="true"></div>
527+
</div>
529528
</div>`)
530529
grid.makeSubGrid(grid.el.getElementById('nested-grid'))
531530
```

src/gridstack.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1690,7 +1690,7 @@ export class GridStack {
16901690
this._writePosAttr(el, node);
16911691

16921692
let attrs /*: GridStackWidget but strings */ = { // remaining attributes
1693-
autoPosition: 'gs-auto-position',
1693+
// autoPosition: 'gs-auto-position', // no need to write out as already in node and doesn't affect CSS
16941694
noResize: 'gs-no-resize',
16951695
noMove: 'gs-no-move',
16961696
locked: 'gs-locked',

0 commit comments

Comments
 (0)