add drag-drop-touch-js/dragdroptouch to composer and use it to add drag and drop functionality for touch devices

This commit is contained in:
chfhtw
2026-04-13 10:38:58 +02:00
parent 653a320e6c
commit 6c90ccfbaa
6 changed files with 53 additions and 1 deletions
+7
View File
@@ -2,6 +2,13 @@ import BsModal from "../Bootstrap/Modal.js";
import { useCachedWidgetLoader } from "../../composables/Dashboard/CachedWidgetLoader.js";
import HeightTransition from "../Tranistion/HeightTransition.js";
import { enableDragDropTouch } from "../../../../vendor/drag-drop-touch-js/dragdroptouch/dist/drag-drop-touch.esm.min.js";
if (!document.dragDropTouchActive) {
enableDragDropTouch();
document.dragDropTouchActive = true;
}
export default {
name: 'Item',
components: {
+7
View File
@@ -1,5 +1,12 @@
import { bindDragEnterLeave } from '../helpers/DragAndDrop.js';
import { enableDragDropTouch } from "../../../vendor/drag-drop-touch-js/dragdroptouch/dist/drag-drop-touch.esm.min.js";
if (!document.dragDropTouchActive) {
enableDragDropTouch();
document.dragDropTouchActive = true;
}
export default {
mounted(el, binding) {
const delay = parseInt(binding.arg) || 300;
+7
View File
@@ -1,5 +1,12 @@
import { setTransferData, convertToValidDragObject } from '../helpers/DragAndDrop.js';
import { enableDragDropTouch } from "../../../vendor/drag-drop-touch-js/dragdroptouch/dist/drag-drop-touch.esm.min.js";
if (!document.dragDropTouchActive) {
enableDragDropTouch();
document.dragDropTouchActive = true;
}
const EFFECTS = [
'none',
'copy',
+7
View File
@@ -1,5 +1,12 @@
import { getValidTransferData, eventHasTypes, bindDragEnterLeave } from '../helpers/DragAndDrop.js';
import { enableDragDropTouch } from "../../../vendor/drag-drop-touch-js/dragdroptouch/dist/drag-drop-touch.esm.min.js";
if (!document.dragDropTouchActive) {
enableDragDropTouch();
document.dragDropTouchActive = true;
}
const EFFECTS = [
'move',
'copy',