gridstack.js issue base

Use this as a base for examples for gridstack.js issues.

by ericpool

HTML

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/gridstack-h5.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/gridstack.min.css">
<h1>gridstack.js base demo for issues</h1>
<p>Fork and modify me to demonstrate your issue when creating an issue for gridstack.js</p>
<div><a class="btn btn-default" onClick="addNewWidget()" href="#">Add Widget</a></div>
<br />

<div class="grid-stack"></div>

CSS

.grid-stack {
  background: lightgoldenrodyellow;
}

.grid-stack-item-content {
  color: #2c3e50;
  text-align: center;
  background-color: #18bc9c;
}

JavaScript

var grid = GridStack.init({
/*         id: 1,
        float: false,
        cellHeight: 250,
        column: 3,
        autoPosition: true,
        minWidth: 900,
        //oneColumnModeDomSort: true,
        draggable: {
            handle: '.drag-card'
        } */
});

var count = 0;
var items = [
	{x: 0, y: 0, w: 2, h: 2},
	{x: 2, y: 0, w: 2},
  {x: 3, y: 1, h: 2},
  {x: 0, y: 2, w: 3},
];

grid.addWidget(items[0]);
grid.addWidget(items[2]);