Only add a drag delay if on mobile instead of setting it to 0
This commit is contained in:
parent
7792cdf8bd
commit
e3787b9496
1 changed files with 17 additions and 8 deletions
|
@ -16,7 +16,8 @@
|
|||
v-model="params"
|
||||
/>
|
||||
</div>
|
||||
<div :class="{ 'is-loading': loading && !oneTaskUpdating}" class="kanban kanban-bucket-container loader-container">
|
||||
<div :class="{ 'is-loading': loading && !oneTaskUpdating}"
|
||||
class="kanban kanban-bucket-container loader-container">
|
||||
<draggable
|
||||
v-model="buckets"
|
||||
@start="() => dragBucket = true"
|
||||
|
@ -26,7 +27,8 @@
|
|||
:disabled="!canWrite"
|
||||
:class="{'dragging-disabled': !canWrite}"
|
||||
>
|
||||
<transition-group type="transition" :name="!dragBucket ? 'move-bucket': null" tag="div" class="kanban-bucket-container">
|
||||
<transition-group type="transition" :name="!dragBucket ? 'move-bucket': null" tag="div"
|
||||
class="kanban-bucket-container">
|
||||
<div
|
||||
:key="`bucket${bucket.id}`"
|
||||
class="bucket"
|
||||
|
@ -254,12 +256,6 @@ export default {
|
|||
return {
|
||||
drag: false,
|
||||
dragBucket: false,
|
||||
dragOptions: {
|
||||
animation: 150,
|
||||
ghostClass: 'ghost',
|
||||
dragClass: 'task-dragging',
|
||||
delay: isTouchDevice() ? 150 : 0,
|
||||
},
|
||||
sourceBucket: 0,
|
||||
|
||||
showBucketDeleteModal: false,
|
||||
|
@ -310,6 +306,19 @@ export default {
|
|||
this.$store.commit('kanban/setBuckets', value)
|
||||
},
|
||||
},
|
||||
dragOptions() {
|
||||
const options = {
|
||||
animation: 150,
|
||||
ghostClass: 'ghost',
|
||||
dragClass: 'task-dragging',
|
||||
}
|
||||
|
||||
if (isTouchDevice()) {
|
||||
options.delay = 150
|
||||
}
|
||||
|
||||
return options
|
||||
},
|
||||
...mapState({
|
||||
loadedListId: state => state.kanban.listId,
|
||||
loading: state => state[LOADING] && state[LOADING_MODULE] === 'kanban',
|
||||
|
|
Loading…
Reference in a new issue