mirror of
https://github.com/9001/copyparty.git
synced 2026-02-27 05:53:11 -07:00
better grid detection for dsel
This commit is contained in:
parent
55625cb5d1
commit
35211b7f25
|
|
@ -9803,8 +9803,7 @@ function reload_browser() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function sel_start(e) {
|
function sel_start(e) {
|
||||||
if (!treectl.dsel) return;
|
if (!thegrid.en || !treectl.dsel) return;
|
||||||
if (!(e.target && e.target.closest('#gfiles'))) return;
|
|
||||||
|
|
||||||
var pos = getpp(e);
|
var pos = getpp(e);
|
||||||
startx = pos.x;
|
startx = pos.x;
|
||||||
|
|
@ -9886,10 +9885,9 @@ function reload_browser() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function dsel_init() {
|
function dsel_init() {
|
||||||
var gspot = ebi('gfiles');
|
window.addEventListener('mousedown', sel_start);
|
||||||
gspot.onmousedown = function(e) { sel_start(e) };
|
window.addEventListener('mousemove', sel_move);
|
||||||
gspot.onmousemove = function(e) { sel_move(e) };
|
window.addEventListener('mouseup', sel_end);
|
||||||
gspot.onmouseup = function(e) { sel_end(e) };
|
|
||||||
|
|
||||||
window.addEventListener('touchstart', sel_start, { passive: true });
|
window.addEventListener('touchstart', sel_start, { passive: true });
|
||||||
window.addEventListener('touchmove', sel_move, { passive: false });
|
window.addEventListener('touchmove', sel_move, { passive: false });
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue