From 9f47613df0e021218f50d7f65da07a9cd9c05e43 Mon Sep 17 00:00:00 2001 From: Alain Dumesny Date: Sun, 25 Sep 2022 08:51:03 -0700 Subject: [PATCH] can drag nested grid over nested grid - Part 2 * more partial fix for #1009 and #992 * you can now drag a nested grid over another one and nest it deeper (992) * fixed size transition * fixed handlers not set when nesting TODO: fix pause to work for enter/leave, more nested testing. Fix tests --- demo/nested_advanced.html | 38 ++++++++++++++++++++++---------------- src/dd-droppable.ts | 6 +++--- src/dd-gridstack.ts | 4 ++-- src/gridstack.scss | 2 +- src/gridstack.ts | 5 ++++- 5 files changed, 32 insertions(+), 23 deletions(-) diff --git a/demo/nested_advanced.html b/demo/nested_advanced.html index e2f6741d4..378bc80d5 100644 --- a/demo/nested_advanced.html +++ b/demo/nested_advanced.html @@ -6,17 +6,20 @@ Advance Nested grids demo - +

Advanced Nested grids demo

-

Create sub-grids on the fly, by dragging items completely over others (nest) vs partially (push) using +

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

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 Grid1 + Add W Grid0 + Add W Grid1 + Add W Grid2 entire save/re-create: Save Destroy @@ -31,10 +34,11 @@

Advanced Nested grids demo