Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions demo/two.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ <h1>Two grids demo</h1>
let grids = GridStack.initAll(options);
grids[1].float(false);

// new 4.x static method instead of setting up options on every grid (never been per grid really) but old options still works
// new 4.x static method instead of setting up options on every grid (never been per grid really)
GridStack.setupDragIn('.sidebar .grid-stack-item', { appendTo: 'body', helper: myClone });
// GridStack.setupDragIn(); // second call will now work (cache last values)

Expand All @@ -85,7 +85,9 @@ <h1>Two grids demo</h1>

// decide what the dropped item will be - for now just a clone but can be anything
function myClone(event) {
return event.target.cloneNode(true);
const el = event.target.cloneNode(true);
el.setAttribute('gs-id', 'foo'); // TEST why clone element is not used directly on drop #2231
return el;
}

function toggleFloat(button, i) {
Expand Down