mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-19 00:26:34 +08:00
33 lines
782 B
TypeScript
33 lines
782 B
TypeScript
import dragula = require("dragula");
|
|
|
|
var d1 = dragula([document.querySelector('#left'), document.querySelector('#right')]);
|
|
|
|
var d2 = dragula({
|
|
isContainer: function (el) {
|
|
return false;
|
|
},
|
|
moves: function (el, container, handle) {
|
|
return true;
|
|
},
|
|
accepts: function (el, target, source, sibling) {
|
|
return true;
|
|
},
|
|
invalid: function (el, target) {
|
|
return el.tagName === 'A' || el.tagName === 'BUTTON';
|
|
},
|
|
direction: 'vertical',
|
|
copy: false,
|
|
revertOnSpill: false,
|
|
removeOnSpill: false,
|
|
delay: false,
|
|
mirrorContainer: document.body,
|
|
ignoreInputTextSelection: true
|
|
});
|
|
|
|
var d3 = dragula();
|
|
|
|
var drake = dragula({
|
|
copy: true
|
|
});
|
|
drake.containers.push(document.querySelector('#container'));
|