From e4c7e8da89a4938a636b2220eeac6a5c512e810c Mon Sep 17 00:00:00 2001 From: Alain Dumesny Date: Sun, 25 Sep 2022 16:46:13 -0700 Subject: [PATCH] using drag and drop to create nested Grids fix #1009 remaining issues * dragging out last item will nuke empty nested grid * dragging over item to create nested grid, will revert back to normal item if you continue to drag out * fixed CSS issues dragging nested in/out couple times --- demo/nested_advanced.html | 14 ++++----- doc/CHANGES.md | 2 +- src/dd-droppable.ts | 1 - src/dd-gridstack.ts | 17 +++++++--- src/dd-manager.ts | 2 +- src/gridstack-engine.ts | 8 ++--- src/gridstack.scss | 2 +- src/gridstack.ts | 65 +++++++++++++++++++++++++++------------ src/types.ts | 13 +++----- src/utils.ts | 2 +- 10 files changed, 78 insertions(+), 48 deletions(-) diff --git a/demo/nested_advanced.html b/demo/nested_advanced.html index 378bc80d5..894a5411f 100644 --- a/demo/nested_advanced.html +++ b/demo/nested_advanced.html @@ -13,7 +13,7 @@

Advanced Nested grids demo

Create sub-grids (darker background) on the fly, by dragging items completely over others (nest) vs partially (push) using - the new v7 API GridStackOptions.subGrid.createDynamic=true

+ 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 @@ -34,28 +34,28 @@

Advanced Nested grids demo