chess/public/assets/js/pages/features/cards/draggable.js
Ramadhon Ikhsan Prasetya 603e31b0f4 init
2024-08-29 10:56:32 +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();
});