forked from gridstack/gridstack.js
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix gridstack#1330 * we now set maxWidth/maxHeight to prevent grid item from resizing past their size * fixed code to prevent item from moving left when they reach max width * added sample test case
- Loading branch information
Showing
4 changed files
with
41 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>resize maxW</title> | ||
<link rel="stylesheet" href="../../../demo/demo.css"/> | ||
<script src="../../../dist/gridstack-h5.js"></script> | ||
</head> | ||
<body> | ||
<div class="container-fluid"> | ||
<p>resize to left with maxW set</p> | ||
<div class="grid-stack"></div> | ||
</div> | ||
<script src="../../../demo/events.js"></script> | ||
<script type="text/javascript"> | ||
let grid = GridStack.init({resizable: { handles: 'sw, se, w, e, s' }}); | ||
addEvents(grid); | ||
grid.load([{x: 2, y: 0, maxW: 1, content: 'max 1'}, {x: 5, y: 0, maxW: 2, content: 'max 2'}]); | ||
</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