|
|
|
@ -1,4 +1,28 @@
|
|
|
|
|
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
|
|
|
|
(function e(t, n, r) {
|
|
|
|
|
function s(o, u) {
|
|
|
|
|
if (!n[o]) {
|
|
|
|
|
if (!t[o]) {
|
|
|
|
|
var a = typeof require == "function" && require;
|
|
|
|
|
if (!u && a) return a(o, !0);
|
|
|
|
|
if (i) return i(o, !0);
|
|
|
|
|
var f = new Error("Cannot find module '" + o + "'");
|
|
|
|
|
throw f.code = "MODULE_NOT_FOUND", f
|
|
|
|
|
}
|
|
|
|
|
var l = n[o] = {
|
|
|
|
|
exports: {}
|
|
|
|
|
};
|
|
|
|
|
t[o][0].call(l.exports, function (e) {
|
|
|
|
|
var n = t[o][1][e];
|
|
|
|
|
return s(n ? n : e)
|
|
|
|
|
}, l, l.exports, e, t, n, r)
|
|
|
|
|
}
|
|
|
|
|
return n[o].exports
|
|
|
|
|
}
|
|
|
|
|
var i = typeof require == "function" && require;
|
|
|
|
|
for (var o = 0; o < r.length; o++) s(r[o]);
|
|
|
|
|
return s
|
|
|
|
|
})({
|
|
|
|
|
1: [function (require, module, exports) {
|
|
|
|
|
/**
|
|
|
|
|
* jKanban
|
|
|
|
|
* Vanilla Javascript plugin for manage kanban boards
|
|
|
|
@ -32,30 +56,18 @@ var dragula = require('dragula');
|
|
|
|
|
dragBoards: true,
|
|
|
|
|
addItemButton: false,
|
|
|
|
|
buttonContent: '+',
|
|
|
|
|
dragEl: function (el, source) {
|
|
|
|
|
},
|
|
|
|
|
dragendEl: function (el) {
|
|
|
|
|
},
|
|
|
|
|
dropEl: function (el, target, source, sibling) {
|
|
|
|
|
},
|
|
|
|
|
dragBoard: function (el, source) {
|
|
|
|
|
},
|
|
|
|
|
dragendBoard: function (el) {
|
|
|
|
|
},
|
|
|
|
|
dropBoard: function (el, target, source, sibling) {
|
|
|
|
|
},
|
|
|
|
|
click: function (el) {
|
|
|
|
|
},
|
|
|
|
|
boardTitleclick: function (el, boardId) {
|
|
|
|
|
},
|
|
|
|
|
buttonClick: function (el, boardId) {
|
|
|
|
|
},
|
|
|
|
|
colorClick: function (el, boardId) {
|
|
|
|
|
},
|
|
|
|
|
removeClick: function(el, boardId) {
|
|
|
|
|
},
|
|
|
|
|
onChange: function() {
|
|
|
|
|
}
|
|
|
|
|
dragEl: function (el, source) {},
|
|
|
|
|
dragendEl: function (el) {},
|
|
|
|
|
dropEl: function (el, target, source, sibling) {},
|
|
|
|
|
dragBoard: function (el, source) {},
|
|
|
|
|
dragendBoard: function (el) {},
|
|
|
|
|
dropBoard: function (el, target, source, sibling) {},
|
|
|
|
|
click: function (el) {},
|
|
|
|
|
boardTitleclick: function (el, boardId) {},
|
|
|
|
|
buttonClick: function (el, boardId) {},
|
|
|
|
|
colorClick: function (el, boardId) {},
|
|
|
|
|
removeClick: function (el, boardId) {},
|
|
|
|
|
onChange: function () {}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
if (arguments[0] && typeof arguments[0] === "object") {
|
|
|
|
@ -100,8 +112,12 @@ var dragula = require('dragula');
|
|
|
|
|
|
|
|
|
|
// TODO: update board object board order
|
|
|
|
|
console.log("Drop " + $(el).attr("data-id") + " just before " + (sibling ? $(sibling).attr("data-id") : " end "));
|
|
|
|
|
var index1 = self.options.boards.findIndex(function(element) { return element.id==$(el).attr("data-id"); });
|
|
|
|
|
var index2 = sibling ? self.options.boards.findIndex(function(element) { return element.id==$(sibling).attr("data-id"); }) : self.options.boards.length;
|
|
|
|
|
var index1 = self.options.boards.findIndex(function (element) {
|
|
|
|
|
return element.id == $(el).attr("data-id");
|
|
|
|
|
});
|
|
|
|
|
var index2 = sibling ? self.options.boards.findIndex(function (element) {
|
|
|
|
|
return element.id == $(sibling).attr("data-id");
|
|
|
|
|
}) : self.options.boards.length;
|
|
|
|
|
console.log("Switch " + index1 + " and " + index2);
|
|
|
|
|
if (index1 < index2)
|
|
|
|
|
index2 = index2 - 1;
|
|
|
|
@ -142,7 +158,9 @@ var dragula = require('dragula');
|
|
|
|
|
.on('cancel', function (el, container, source) {
|
|
|
|
|
console.log("In cancel");
|
|
|
|
|
if (confirm("Do you want to remove this item?")) {
|
|
|
|
|
var board1 = self.options.boards.find(function(element) { return element.id==$(source.parentNode).attr("data-id"); });
|
|
|
|
|
var board1 = self.options.boards.find(function (element) {
|
|
|
|
|
return element.id == $(source.parentNode).attr("data-id");
|
|
|
|
|
});
|
|
|
|
|
var pos1 = self.dragItemPos;
|
|
|
|
|
board1.item.splice(pos1, 1);
|
|
|
|
|
$(el).remove();
|
|
|
|
@ -153,8 +171,12 @@ var dragula = require('dragula');
|
|
|
|
|
console.log("In drop");
|
|
|
|
|
|
|
|
|
|
// TODO: update board object board order
|
|
|
|
|
var board1 = self.options.boards.find(function(element) { return element.id==$(source.parentNode).attr("data-id"); });
|
|
|
|
|
var board2 = self.options.boards.find(function(element) { return element.id==$(target.parentNode).attr("data-id"); });
|
|
|
|
|
var board1 = self.options.boards.find(function (element) {
|
|
|
|
|
return element.id == $(source.parentNode).attr("data-id");
|
|
|
|
|
});
|
|
|
|
|
var board2 = self.options.boards.find(function (element) {
|
|
|
|
|
return element.id == $(target.parentNode).attr("data-id");
|
|
|
|
|
});
|
|
|
|
|
var pos1 = self.dragItemPos;
|
|
|
|
|
var pos2 = (sibling) ? self.findElementPosition(sibling) : (board2.item.length + 1);
|
|
|
|
|
console.log("Drop element " + pos1 + " before " + pos2);
|
|
|
|
@ -199,7 +221,9 @@ var dragula = require('dragula');
|
|
|
|
|
|
|
|
|
|
// add Element to JSON
|
|
|
|
|
var boardJSON = __findBoardJSON(boardID);
|
|
|
|
|
boardJSON.item.push({ title : element.title });
|
|
|
|
|
boardJSON.item.push({
|
|
|
|
|
title: element.title
|
|
|
|
|
});
|
|
|
|
|
var board = self.element.querySelector('[data-id="' + boardID + '"] .kanban-drag');
|
|
|
|
|
var nodeItem = document.createElement('div');
|
|
|
|
|
nodeItem.classList.add('kanban-item');
|
|
|
|
@ -494,22 +518,33 @@ var dragula = require('dragula');
|
|
|
|
|
}());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},{"dragula":9}],2:[function(require,module,exports){
|
|
|
|
|
module.exports = function atoa (a, n) { return Array.prototype.slice.call(a, n); }
|
|
|
|
|
}, {
|
|
|
|
|
"dragula": 9
|
|
|
|
|
}],
|
|
|
|
|
2: [function (require, module, exports) {
|
|
|
|
|
module.exports = function atoa(a, n) {
|
|
|
|
|
return Array.prototype.slice.call(a, n);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},{}],3:[function(require,module,exports){
|
|
|
|
|
}, {}],
|
|
|
|
|
3: [function (require, module, exports) {
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
|
|
var ticky = require('ticky');
|
|
|
|
|
|
|
|
|
|
module.exports = function debounce(fn, args, ctx) {
|
|
|
|
|
if (!fn) { return; }
|
|
|
|
|
if (!fn) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
ticky(function run() {
|
|
|
|
|
fn.apply(ctx || null, args || []);
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
},{"ticky":10}],4:[function(require,module,exports){
|
|
|
|
|
}, {
|
|
|
|
|
"ticky": 10
|
|
|
|
|
}],
|
|
|
|
|
4: [function (require, module, exports) {
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
|
|
var atoa = require('atoa');
|
|
|
|
@ -518,7 +553,9 @@ var debounce = require('./debounce');
|
|
|
|
|
module.exports = function emitter(thing, options) {
|
|
|
|
|
var opts = options || {};
|
|
|
|
|
var evt = {};
|
|
|
|
|
if (thing === undefined) { thing = {}; }
|
|
|
|
|
if (thing === undefined) {
|
|
|
|
|
thing = {};
|
|
|
|
|
}
|
|
|
|
|
thing.on = function (type, fn) {
|
|
|
|
|
if (!evt[type]) {
|
|
|
|
|
evt[type] = [fn];
|
|
|
|
@ -540,7 +577,9 @@ module.exports = function emitter (thing, options) {
|
|
|
|
|
evt = {};
|
|
|
|
|
} else {
|
|
|
|
|
var et = evt[type];
|
|
|
|
|
if (!et) { return thing; }
|
|
|
|
|
if (!et) {
|
|
|
|
|
return thing;
|
|
|
|
|
}
|
|
|
|
|
et.splice(et.indexOf(fn), 1);
|
|
|
|
|
}
|
|
|
|
|
return thing;
|
|
|
|
@ -554,10 +593,18 @@ module.exports = function emitter (thing, options) {
|
|
|
|
|
return function () {
|
|
|
|
|
var args = atoa(arguments);
|
|
|
|
|
var ctx = this || thing;
|
|
|
|
|
if (type === 'error' && opts.throws !== false && !et.length) { throw args.length === 1 ? args[0] : args; }
|
|
|
|
|
if (type === 'error' && opts.throws !== false && !et.length) {
|
|
|
|
|
throw args.length === 1 ? args[0] : args;
|
|
|
|
|
}
|
|
|
|
|
et.forEach(function emitter(listen) {
|
|
|
|
|
if (opts.async) { debounce(listen, args, ctx); } else { listen.apply(ctx, args); }
|
|
|
|
|
if (listen._once) { thing.off(type, listen); }
|
|
|
|
|
if (opts.async) {
|
|
|
|
|
debounce(listen, args, ctx);
|
|
|
|
|
} else {
|
|
|
|
|
listen.apply(ctx, args);
|
|
|
|
|
}
|
|
|
|
|
if (listen._once) {
|
|
|
|
|
thing.off(type, listen);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return thing;
|
|
|
|
|
};
|
|
|
|
@ -565,7 +612,11 @@ module.exports = function emitter (thing, options) {
|
|
|
|
|
return thing;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
},{"./debounce":3,"atoa":2}],5:[function(require,module,exports){
|
|
|
|
|
}, {
|
|
|
|
|
"./debounce": 3,
|
|
|
|
|
"atoa": 2
|
|
|
|
|
}],
|
|
|
|
|
5: [function (require, module, exports) {
|
|
|
|
|
(function (global) {
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
|
@ -613,6 +664,7 @@ function fabricateEvent (el, type, model) {
|
|
|
|
|
} else {
|
|
|
|
|
el.fireEvent('on' + type, e);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function makeClassicEvent() {
|
|
|
|
|
var e;
|
|
|
|
|
if (doc.createEvent) {
|
|
|
|
@ -623,8 +675,11 @@ function fabricateEvent (el, type, model) {
|
|
|
|
|
}
|
|
|
|
|
return e;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function makeCustomEvent() {
|
|
|
|
|
return new customEvent(type, { detail: model });
|
|
|
|
|
return new customEvent(type, {
|
|
|
|
|
detail: model
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -632,8 +687,12 @@ function wrapperFactory (el, type, fn) {
|
|
|
|
|
return function wrapper(originalEvent) {
|
|
|
|
|
var e = originalEvent || global.event;
|
|
|
|
|
e.target = e.target || e.srcElement;
|
|
|
|
|
e.preventDefault = e.preventDefault || function preventDefault () { e.returnValue = false; };
|
|
|
|
|
e.stopPropagation = e.stopPropagation || function stopPropagation () { e.cancelBubble = true; };
|
|
|
|
|
e.preventDefault = e.preventDefault || function preventDefault() {
|
|
|
|
|
e.returnValue = false;
|
|
|
|
|
};
|
|
|
|
|
e.stopPropagation = e.stopPropagation || function stopPropagation() {
|
|
|
|
|
e.cancelBubble = true;
|
|
|
|
|
};
|
|
|
|
|
e.which = e.which || e.keyCode;
|
|
|
|
|
fn.call(el, e);
|
|
|
|
|
};
|
|
|
|
@ -670,7 +729,11 @@ function find (el, type, fn) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}).call(this, typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
|
|
|
},{"./eventmap":6,"custom-event":7}],6:[function(require,module,exports){
|
|
|
|
|
}, {
|
|
|
|
|
"./eventmap": 6,
|
|
|
|
|
"custom-event": 7
|
|
|
|
|
}],
|
|
|
|
|
6: [function (require, module, exports) {
|
|
|
|
|
(function (global) {
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
|
@ -687,17 +750,21 @@ for (eventname in global) {
|
|
|
|
|
module.exports = eventmap;
|
|
|
|
|
|
|
|
|
|
}).call(this, typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
|
|
|
},{}],7:[function(require,module,exports){
|
|
|
|
|
}, {}],
|
|
|
|
|
7: [function (require, module, exports) {
|
|
|
|
|
(function (global) {
|
|
|
|
|
|
|
|
|
|
var NativeCustomEvent = global.CustomEvent;
|
|
|
|
|
|
|
|
|
|
function useNative() {
|
|
|
|
|
try {
|
|
|
|
|
var p = new NativeCustomEvent('cat', { detail: { foo: 'bar' } });
|
|
|
|
|
return 'cat' === p.type && 'bar' === p.detail.foo;
|
|
|
|
|
} catch (e) {
|
|
|
|
|
var p = new NativeCustomEvent('cat', {
|
|
|
|
|
detail: {
|
|
|
|
|
foo: 'bar'
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return 'cat' === p.type && 'bar' === p.detail.foo;
|
|
|
|
|
} catch (e) {}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -739,7 +806,8 @@ function CustomEvent (type, params) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}).call(this, typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
|
|
|
},{}],8:[function(require,module,exports){
|
|
|
|
|
}, {}],
|
|
|
|
|
8: [function (require, module, exports) {
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
|
|
var cache = {};
|
|
|
|
@ -774,7 +842,8 @@ module.exports = {
|
|
|
|
|
rm: rmClass
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
},{}],9:[function(require,module,exports){
|
|
|
|
|
}, {}],
|
|
|
|
|
9: [function (require, module, exports) {
|
|
|
|
|
(function (global) {
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
|
@ -805,18 +874,42 @@ function dragula (initialContainers, options) {
|
|
|
|
|
var _grabbed; // holds mousedown context until first mousemove
|
|
|
|
|
|
|
|
|
|
var o = options || {};
|
|
|
|
|
if (o.moves === void 0) { o.moves = always; }
|
|
|
|
|
if (o.accepts === void 0) { o.accepts = always; }
|
|
|
|
|
if (o.invalid === void 0) { o.invalid = invalidTarget; }
|
|
|
|
|
if (o.containers === void 0) { o.containers = initialContainers || []; }
|
|
|
|
|
if (o.isContainer === void 0) { o.isContainer = never; }
|
|
|
|
|
if (o.copy === void 0) { o.copy = false; }
|
|
|
|
|
if (o.copySortSource === void 0) { o.copySortSource = false; }
|
|
|
|
|
if (o.revertOnSpill === void 0) { o.revertOnSpill = false; }
|
|
|
|
|
if (o.removeOnSpill === void 0) { o.removeOnSpill = false; }
|
|
|
|
|
if (o.direction === void 0) { o.direction = 'vertical'; }
|
|
|
|
|
if (o.ignoreInputTextSelection === void 0) { o.ignoreInputTextSelection = true; }
|
|
|
|
|
if (o.mirrorContainer === void 0) { o.mirrorContainer = doc.body; }
|
|
|
|
|
if (o.moves === void 0) {
|
|
|
|
|
o.moves = always;
|
|
|
|
|
}
|
|
|
|
|
if (o.accepts === void 0) {
|
|
|
|
|
o.accepts = always;
|
|
|
|
|
}
|
|
|
|
|
if (o.invalid === void 0) {
|
|
|
|
|
o.invalid = invalidTarget;
|
|
|
|
|
}
|
|
|
|
|
if (o.containers === void 0) {
|
|
|
|
|
o.containers = initialContainers || [];
|
|
|
|
|
}
|
|
|
|
|
if (o.isContainer === void 0) {
|
|
|
|
|
o.isContainer = never;
|
|
|
|
|
}
|
|
|
|
|
if (o.copy === void 0) {
|
|
|
|
|
o.copy = false;
|
|
|
|
|
}
|
|
|
|
|
if (o.copySortSource === void 0) {
|
|
|
|
|
o.copySortSource = false;
|
|
|
|
|
}
|
|
|
|
|
if (o.revertOnSpill === void 0) {
|
|
|
|
|
o.revertOnSpill = false;
|
|
|
|
|
}
|
|
|
|
|
if (o.removeOnSpill === void 0) {
|
|
|
|
|
o.removeOnSpill = false;
|
|
|
|
|
}
|
|
|
|
|
if (o.direction === void 0) {
|
|
|
|
|
o.direction = 'vertical';
|
|
|
|
|
}
|
|
|
|
|
if (o.ignoreInputTextSelection === void 0) {
|
|
|
|
|
o.ignoreInputTextSelection = true;
|
|
|
|
|
}
|
|
|
|
|
if (o.mirrorContainer === void 0) {
|
|
|
|
|
o.mirrorContainer = doc.body;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var drake = emitter({
|
|
|
|
|
containers: o.containers,
|
|
|
|
@ -1184,9 +1277,22 @@ function dragula (initialContainers, options) {
|
|
|
|
|
dropTarget.insertBefore(item, reference);
|
|
|
|
|
drake.emit('shadow', item, dropTarget, _source);
|
|
|
|
|
}
|
|
|
|
|
function moved (type) { drake.emit(type, item, _lastDropTarget, _source); }
|
|
|
|
|
function over () { if (changed) { moved('over'); } }
|
|
|
|
|
function out () { if (_lastDropTarget) { moved('out'); } }
|
|
|
|
|
|
|
|
|
|
function moved(type) {
|
|
|
|
|
drake.emit(type, item, _lastDropTarget, _source);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function over() {
|
|
|
|
|
if (changed) {
|
|
|
|
|
moved('over');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function out() {
|
|
|
|
|
if (_lastDropTarget) {
|
|
|
|
|
moved('out');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function spillOver(el) {
|
|
|
|
@ -1194,7 +1300,9 @@ function dragula (initialContainers, options) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function spillOut(el) {
|
|
|
|
|
if (drake.dragging) { classes.add(el, 'gu-hide'); }
|
|
|
|
|
if (drake.dragging) {
|
|
|
|
|
classes.add(el, 'gu-hide');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function renderMirrorImage() {
|
|
|
|
@ -1246,8 +1354,12 @@ function dragula (initialContainers, options) {
|
|
|
|
|
for (i = 0; i < len; i++) {
|
|
|
|
|
el = dropTarget.children[i];
|
|
|
|
|
rect = el.getBoundingClientRect();
|
|
|
|
|
if (horizontal && (rect.left + rect.width / 2) > x) { return el; }
|
|
|
|
|
if (!horizontal && (rect.top + rect.height / 2) > y) { return el; }
|
|
|
|
|
if (horizontal && (rect.left + rect.width / 2) > x) {
|
|
|
|
|
return el;
|
|
|
|
|
}
|
|
|
|
|
if (!horizontal && (rect.top + rect.height / 2) > y) {
|
|
|
|
|
return el;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
@ -1297,9 +1409,15 @@ function touchy (el, op, type, fn) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function whichMouseButton(e) {
|
|
|
|
|
if (e.touches !== void 0) { return e.touches.length; }
|
|
|
|
|
if (e.which !== void 0 && e.which !== 0) { return e.which; } // see https://github.com/bevacqua/dragula/issues/261
|
|
|
|
|
if (e.buttons !== void 0) { return e.buttons; }
|
|
|
|
|
if (e.touches !== void 0) {
|
|
|
|
|
return e.touches.length;
|
|
|
|
|
}
|
|
|
|
|
if (e.which !== void 0 && e.which !== 0) {
|
|
|
|
|
return e.which;
|
|
|
|
|
} // see https://github.com/bevacqua/dragula/issues/261
|
|
|
|
|
if (e.buttons !== void 0) {
|
|
|
|
|
return e.buttons;
|
|
|
|
|
}
|
|
|
|
|
var button = e.button;
|
|
|
|
|
if (button !== void 0) { // see https://github.com/jquery/jquery/blob/99e8ff1baa7ae341e94bb89c3e84570c7c3ad9ea/src/event.js#L573-L575
|
|
|
|
|
return button & 1 ? 1 : button & 2 ? 3 : (button & 4 ? 2 : 0);
|
|
|
|
@ -1334,21 +1452,46 @@ function getElementBehindPoint (point, x, y) {
|
|
|
|
|
return el;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function never () { return false; }
|
|
|
|
|
function always () { return true; }
|
|
|
|
|
function getRectWidth (rect) { return rect.width || (rect.right - rect.left); }
|
|
|
|
|
function getRectHeight (rect) { return rect.height || (rect.bottom - rect.top); }
|
|
|
|
|
function getParent (el) { return el.parentNode === doc ? null : el.parentNode; }
|
|
|
|
|
function isInput (el) { return el.tagName === 'INPUT' || el.tagName === 'TEXTAREA' || el.tagName === 'SELECT' || isEditable(el); }
|
|
|
|
|
function never() {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function always() {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getRectWidth(rect) {
|
|
|
|
|
return rect.width || (rect.right - rect.left);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getRectHeight(rect) {
|
|
|
|
|
return rect.height || (rect.bottom - rect.top);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getParent(el) {
|
|
|
|
|
return el.parentNode === doc ? null : el.parentNode;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function isInput(el) {
|
|
|
|
|
return el.tagName === 'INPUT' || el.tagName === 'TEXTAREA' || el.tagName === 'SELECT' || isEditable(el);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function isEditable(el) {
|
|
|
|
|
if (!el) { return false; } // no parents were editable
|
|
|
|
|
if (el.contentEditable === 'false') { return false; } // stop the lookup
|
|
|
|
|
if (el.contentEditable === 'true') { return true; } // found a contentEditable element in the chain
|
|
|
|
|
if (!el) {
|
|
|
|
|
return false;
|
|
|
|
|
} // no parents were editable
|
|
|
|
|
if (el.contentEditable === 'false') {
|
|
|
|
|
return false;
|
|
|
|
|
} // stop the lookup
|
|
|
|
|
if (el.contentEditable === 'true') {
|
|
|
|
|
return true;
|
|
|
|
|
} // found a contentEditable element in the chain
|
|
|
|
|
return isEditable(getParent(el)); // contentEditable is set to 'inherit'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function nextEl(el) {
|
|
|
|
|
return el.nextElementSibling || manually();
|
|
|
|
|
|
|
|
|
|
function manually() {
|
|
|
|
|
var sibling = el;
|
|
|
|
|
do {
|
|
|
|
@ -1386,13 +1529,24 @@ function getCoord (coord, e) {
|
|
|
|
|
module.exports = dragula;
|
|
|
|
|
|
|
|
|
|
}).call(this, typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
|
|
|
},{"./classes":8,"contra/emitter":4,"crossvent":5}],10:[function(require,module,exports){
|
|
|
|
|
var si = typeof setImmediate === 'function', tick;
|
|
|
|
|
}, {
|
|
|
|
|
"./classes": 8,
|
|
|
|
|
"contra/emitter": 4,
|
|
|
|
|
"crossvent": 5
|
|
|
|
|
}],
|
|
|
|
|
10: [function (require, module, exports) {
|
|
|
|
|
var si = typeof setImmediate === 'function',
|
|
|
|
|
tick;
|
|
|
|
|
if (si) {
|
|
|
|
|
tick = function (fn) { setImmediate(fn); };
|
|
|
|
|
tick = function (fn) {
|
|
|
|
|
setImmediate(fn);
|
|
|
|
|
};
|
|
|
|
|
} else {
|
|
|
|
|
tick = function (fn) { setTimeout(fn, 0); };
|
|
|
|
|
tick = function (fn) {
|
|
|
|
|
setTimeout(fn, 0);
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
module.exports = tick;
|
|
|
|
|
},{}]},{},[1]);
|
|
|
|
|
}, {}]
|
|
|
|
|
}, {}, [1]);
|