pos-gis/public/assets/js/pages/features/cards/draggable.js

30 lines
739 B
JavaScript
Raw Normal View History

2024-10-07 06:13:42 +00:00
"use strict";
var KTCardDraggable = function() {
return {
//main function to initiate the module
init: function() {
var containers = document.querySelectorAll('.draggable-zone');
if (containers.length === 0) {
return false;
}
var swappable = new Sortable.default(containers, {
draggable: '.draggable',
handle: '.draggable .draggable-handle',
mirror: {
//appendTo: selector,
appendTo: 'body',
constrainDimensions: true
}
});
}
};
}();
jQuery(document).ready(function() {
KTCardDraggable.init();
});