You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<pclass="col-12">NOTE: When using nested Sortables with animation, it is recommended that the <code>fallbackOnBody</code> option is set to true.</p>
307
+
<pclass="col-12">NOTE: When using nested Sortables with animation, it is recommended that the <code>fallbackOnBody</code> option is set to true.<br/>It is also always recommended that either the <code>invertSwap</code> option is set to true, or the <code>swapThreshold</code> option is lower than the default value of 1 (eg <code>0.65</code>).</p>
304
308
<divid="nestedDemo" class="list-group col nested-sortable">
<preclass="prettyprint">// Loop through each nested sortable element
338
+
for (var i = 0; i <nestedSortables.length;i++){
339
+
newSortable(nestedSortables[i],{
340
+
group: 'nested',
341
+
animation: 150,
342
+
fallbackOnBody: true,
343
+
swapThreshold: 0.65
344
+
});
345
+
}</pre>
346
+
</div>
347
+
</div>
348
+
349
+
<divclass="row">
350
+
<h2class="col-12">Plugins</h2>
351
+
</div>
352
+
<hr/>
353
+
354
+
<divid="multi-drag" class="row">
355
+
<h4class="col-12">MultiDrag</h4>
356
+
<pclass="col-12">The <atarget="_blank" href="https://github.com/SortableJS/Sortable/tree/master/plugins/MultiDrag">MultiDrag</a> plugin allows for multiple items to be dragged at a time. You can click to "select" multiple items, and then drag them as one item.</p>
selectedClass: 'selected', // The class applied to the selected items
369
+
animation: 150
370
+
});</pre>
371
+
</div>
372
+
</div>
373
+
<hr/>
374
+
375
+
<divid="swap" class="row">
376
+
<h4class="col-12">Swap</h4>
377
+
<pclass="col-12">The <atarget="_blank" href="https://github.com/SortableJS/Sortable/tree/master/plugins/Swap">Swap</a> plugin changes the behaviour of Sortable to allow for items to be swapped with eachother rather than sorted.</p>
378
+
<divid="swapDemo" class="list-group col">
379
+
<divclass="list-group-item">Item 1</div>
380
+
<divclass="list-group-item">Item 2</div>
381
+
<divclass="list-group-item">Item 3</div>
382
+
<divclass="list-group-item">Item 4</div>
383
+
<divclass="list-group-item">Item 5</div>
384
+
<divclass="list-group-item">Item 6</div>
385
+
</div>
386
+
<divstyle="padding: 0" class="col-12">
387
+
<preclass="prettyprint">new Sortable(swapDemo, {
388
+
swap: true, // Enable swap plugin
389
+
swapClass: 'highlight', // The class applied to the hovered swap item
0 commit comments