-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1335 from adumesny/typescript
TS: more fixed for load()
- Loading branch information
Showing
8 changed files
with
58 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>load() Test</title> | ||
<link rel="stylesheet" href="../../../demo/demo.css"/> | ||
<script src="../../../demo/events.js"></script> | ||
<script src="../../../dist/gridstack.all.js"></script> | ||
</head> | ||
<body> | ||
<div class="container-fluid"> | ||
<h1>load() Test</h1> | ||
<br/> | ||
<div class="grid-stack"> | ||
<div class="grid-stack-item" data-gs-x="0" data-gs-y="0" data-gs-width="4" data-gs-height="2" data-gs-id="item1" id="item1"> | ||
<div class="grid-stack-item-content">item 1</div> | ||
</div> | ||
<div class="grid-stack-item" data-gs-x="4" data-gs-y="0" data-gs-width="4" data-gs-height="4" data-gs-id="item2" id="item2"> | ||
<div class="grid-stack-item-content">item 2</div> | ||
</div> | ||
</div> | ||
</div> | ||
<script type="text/javascript"> | ||
var grid = GridStack.init(); | ||
addEvents(grid); | ||
|
||
grid.load([{width:2, height:1, id:'item3'}], true); | ||
var layout = grid.save(); | ||
console.log('layout should be {x:0, y:0, width:2, height:1, id:item3}'); | ||
console.log(layout); | ||
// expect(layout).toEqual([{x:0, y:0, width:2, height:1, id:'item3'}]); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters