From 576032a82e01af530738948e747da7e3109c9935 Mon Sep 17 00:00:00 2001 From: Alain Dumesny Date: Sun, 9 Oct 2022 06:39:23 -0700 Subject: [PATCH] more nested grid fixes more for #1009 * fixed makeSubGrid() to migrate node content field as well (not just html dom) * save() now removes w,h of 1 * fixed dragging sub-grid over another, dragging content out not deleting empty sub-grid * fixed test cases --- demo/nested_advanced.html | 26 +++++++++++---------- doc/CHANGES.md | 7 +++--- spec/gridstack-spec.ts | 40 ++++++++++++++++---------------- src/dd-gridstack.ts | 11 +++++---- src/gridstack-engine.ts | 3 +-- src/gridstack.ts | 48 ++++++++++++++++++++++----------------- src/utils.ts | 6 +++-- 7 files changed, 77 insertions(+), 64 deletions(-) diff --git a/demo/nested_advanced.html b/demo/nested_advanced.html index 894a5411f..1d5230ce5 100644 --- a/demo/nested_advanced.html +++ b/demo/nested_advanced.html @@ -16,14 +16,14 @@

Advanced Nested grids demo

the new v7 API GridStackOptions.subGridDynamic=true

This will use the new delay drag&drop option DDDragOpt.pause to tell the gesture difference

Note: gridstack-extra.min.css is required for [2-11] column of sub-grids

- Add Widget + Add Widget Add W Grid0 Add W Grid1 Add W Grid2 entire save/re-create: Save Destroy - Create + Load partial save/load: Save list Save no content @@ -34,11 +34,6 @@

Advanced Nested grids demo