@@ -109,20 +108,6 @@ You can use any element for the list and its elements, not just `ul`/`li`. Here
...
@@ -109,20 +108,6 @@ You can use any element for the list and its elements, not just `ul`/`li`. Here
---
---
### Using Plugins
Sortable has several plugins that extend the library beyond it's default capabilities.
To see a list of these plugins, open the `plugins/` directory.
Some of these plugins are "default" plugins, while others are "extra" plugins. Default plugins add optional features to Sortable (eg. AutoScroll), while extra plugins siginificantly modify the behaviour of Sortable (eg. MultiDrag).
Plugins are mounted using `Sortable.mount()` (see example above).
Once a plugin is mounted, it must be enabled in the options of the sortable in order for it to be enabled. The name of the option is the plugin's pluginName, and can be found in the plugin's README, along with other options the plugin specifies.
---
### Options
### Options
```js
```js
varsortable=newSortable(el,{
varsortable=newSortable(el,{
...
@@ -513,17 +498,6 @@ Dragging only starts if you move the pointer past a certain tolerance, so that y
...
@@ -513,17 +498,6 @@ Dragging only starts if you move the pointer past a certain tolerance, so that y
---
---
#### `scroll` option
If set to `true`, the page (or sortable-area) scrolls when coming to an edge.
**INFO: This plugin is a default plugin, and is included in the default UMD and ESM builds of Sortable**
**This plugin is a default plugin, and is included in the default UMD and ESM builds of Sortable**
---
---
...
@@ -14,7 +14,7 @@ Demo:
...
@@ -14,7 +14,7 @@ Demo:
```js
```js
new Sortable(el, {
new Sortable(el, {
scroll:true, // or HTMLElement
scroll:true, // Enable the plugin. Can be HTMLElement.
scrollFn:function(offsetX, offsetY, originalEvent, touchEvt, hoverTargetEl) { ... }, // if you have custom scrollbar scrollFn may be used for autoscrolling
scrollFn:function(offsetX, offsetY, originalEvent, touchEvt, hoverTargetEl) { ... }, // if you have custom scrollbar scrollFn may be used for autoscrolling
scrollSensitivity:30, // px, how near the mouse must be to an edge to start scrolling.
scrollSensitivity:30, // px, how near the mouse must be to an edge to start scrolling.
scrollSpeed:10, // px, speed of the scrolling
scrollSpeed:10, // px, speed of the scrolling
...
@@ -26,9 +26,21 @@ new Sortable(el, {
...
@@ -26,9 +26,21 @@ new Sortable(el, {
---
---
#### `scroll` option
Enables the plugin. Defaults to `true`. May also be set to an HTMLElement which will be where autoscrolling is rooted.
This file contains two seperate plugins, RemoveOnSpill and RevertOnSpill. They can be imported individually, or the default export (an array of both plugins) can be passed to `Sortable.mount` as well.
This file contains two seperate plugins, RemoveOnSpill and RevertOnSpill. They can be imported individually, or the default export (an array of both plugins) can be passed to `Sortable.mount` as well.
**These plugins are default plugins, and are included in the default UMD and ESM builds of Sortable**