forked from gridstack/gridstack.js
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nested grid in/out drag from parent support
* fix gridstack#992 * we now support dragging into and out of nested grids from parents * nested.html was updated to showcase this, settings all grids to accept the same widgets. using CSS to differentiate nested items vs not for styling/demo purpose only. * tested nested, float nad two.html - all seem to continue working (this was a lot of work to fine tune) * also fix gridstack#1558 as we no longer cache the grid position (as we may move when items are placed elsewhere) but get it on every move to reflect latest data Thank you [@arclogos132](https://github.com/arclogos132) for sponsoring it.
- Loading branch information
Showing
9 changed files
with
149 additions
and
56 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<!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>disable move after</title> | ||
|
||
<link rel="stylesheet" href="../../../demo/demo.css"/> | ||
<script src="../../../dist/gridstack-h5.js"></script> | ||
|
||
</head> | ||
<body> | ||
<div class="container-fluid"> | ||
<h1>#1558 items moves too much</h1> | ||
<div class="grid-stack"> | ||
<div class="grid-stack-item" gs-x="0" gs-y="0" gs-w="2" gs-h="1"> | ||
<div class="grid-stack-item-content">item1 </div> | ||
</div> | ||
<div class="grid-stack-item" gs-x="3" gs-y="1" gs-w="2" gs-h="1"> | ||
<div class="grid-stack-item-content">item2</div> | ||
</div> | ||
</div> | ||
<br> | ||
<div class="grid-stack"> | ||
<div class="grid-stack-item" gs-x="0" gs-y="0" gs-w="2" gs-h="1"> | ||
<div class="grid-stack-item-content">item1 </div> | ||
</div> | ||
<div class="grid-stack-item" gs-x="0" gs-y="1" gs-w="2" gs-h="1"> | ||
<div class="grid-stack-item-content">item2</div> | ||
</div> | ||
</div> | ||
</div> | ||
<script src="../../../demo/events.js"></script> | ||
<script type="text/javascript"> | ||
var options = { | ||
float: true, | ||
acceptWidgets: true, | ||
cellHeight: 80 | ||
}; | ||
GridStack.initAll(options); | ||
</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
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
Oops, something went wrong.