pos-gis/public/assets/js/pages/features/cards/draggable.js
2024-10-07 13:13:42 +07:00

30 lines
739 B
JavaScript
Vendored

"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();
});