Skip to content

Commit

Permalink
feat: added prop scrollSpeed
Browse files Browse the repository at this point in the history
  • Loading branch information
mfuu committed Jul 7, 2024
1 parent a7fe198 commit d645e20
Show file tree
Hide file tree
Showing 9 changed files with 125 additions and 131 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ export default {
| `disabled` | `Boolean` | `false` | Disables the sortable if set to true |
| `animation` | `Number` | `150` | Animation speed moving items when sorting |
| `autoScroll` | `Boolean` | `true` | Automatic scrolling when moving to the edge of the container |
| `scrollSpeed` | `Object` | `{ x: 10, y: 10 }` | Vertical&Horizontal scrolling speed (px) |
| `scrollThreshold` | `Number` | `55` | Threshold to trigger autoscroll |
| `delay` | `Number` | `0` | Time in milliseconds to define when the sorting should start |
| `delayOnTouchOnly` | `Boolean` | `false` | Only delay on press if user is using touch |
Expand Down
227 changes: 103 additions & 124 deletions dist/virtual-drag-list.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/virtual-drag-list.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/components/table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default {
<style scoped>
.table-list {
height: 500px;
padding: 5px;
padding: 0 5px;
}
.list-item {
Expand Down
9 changes: 9 additions & 0 deletions docs/guide/props.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,15 @@ Animation speed moving items when sorting

Automatic scrolling when moving to the edge of the container

## `scrollSpeed`

| **Type** | **Default** |
| --------- | ----------------------- |
| `Object` | `{ x: 10, y: 10 }` |

Vertical&Horizontal scrolling speed (px)


## `scrollThreshold`

| **Type** | **Default** |
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-virtual-draglist",
"version": "2.9.1",
"version": "2.9.2",
"description": "A virtual scrolling list component that can be sorted by dragging",
"main": "dist/virtual-drag-list.min.js",
"files": [
Expand Down Expand Up @@ -36,7 +36,7 @@
},
"homepage": "https://github.com/mfuu/vue-virtual-drag-list#readme",
"dependencies": {
"sortable-dnd": "^0.6.15"
"sortable-dnd": "latest"
},
"devDependencies": {
"@babel/core": "^7.8.7",
Expand Down
2 changes: 1 addition & 1 deletion src/core
Submodule core updated 4 files
+4 −24 README.md
+5 −19 Sortable.js
+23 −10 Virtual.js
+14 −10 index.d.ts
1 change: 1 addition & 0 deletions src/item.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Vue from 'vue';
import { ItemProps } from './props';

const Item = Vue.component('virtual-list-item', {
Expand Down
4 changes: 4 additions & 0 deletions src/props.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ export const VirtualProps = {
type: Boolean,
default: true,
},
scrollSpeed: {
type: Object,
default: () => ({ x: 10, y: 10 }),
},
scrollThreshold: {
type: Number,
default: 55,
Expand Down

0 comments on commit d645e20

Please sign in to comment.