|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | +<head> |
| 4 | + <meta charset="utf-8"> |
| 5 | + <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| 6 | + <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 7 | + <title>#2633 Drop into full crash</title> |
| 8 | + <link rel="stylesheet" href="../../../demo/demo.css" /> |
| 9 | + <script src="../../../dist/gridstack-all.js"></script> |
| 10 | +</head> |
| 11 | +<body> |
| 12 | + <div class="container-fluid"> |
| 13 | + <h1>#2633 Drop into full crash</h1> |
| 14 | + <div class="grid-stack-item" gs-w="2" gs-h="2"> |
| 15 | + <div class="grid-stack-item-content">2x2</div> |
| 16 | + </div> |
| 17 | + <br><br> |
| 18 | + <div class="grid-stack"></div> |
| 19 | + </div> |
| 20 | + <script src="events.js"></script> |
| 21 | + <script type="text/javascript"> |
| 22 | + var count = 0; |
| 23 | + var items = [ |
| 24 | + {x: 0, y: 0, w: 2, h: 2}, |
| 25 | + {x: 2, y: 0, w: 2, h: 2}, |
| 26 | + {x: 4, y: 0, w: 2, h: 2}, |
| 27 | + {x: 6, y: 0, w: 2, h: 2}, |
| 28 | + {x: 8, y: 0, w: 2, h: 2}, |
| 29 | + {x: 10, y: 0, w: 2, h: 2}, |
| 30 | + ]; |
| 31 | + items.forEach(w => w.content = String(count++)); |
| 32 | + |
| 33 | + var options = { // put in gridstack options here |
| 34 | + float: false, |
| 35 | + acceptWidgets: true, |
| 36 | + maxRow: 2 |
| 37 | + }; |
| 38 | + var grid = GridStack.init(options).load(items); |
| 39 | + |
| 40 | + GridStack.setupDragIn('.grid-stack-item', { appendTo: 'body', helper: 'clone' }); |
| 41 | + </script> |
| 42 | +</body> |
| 43 | +</html> |
0 commit comments