better grid detection for dsel

This commit is contained in:
icxes 2026-01-16 02:33:56 +02:00
parent 55625cb5d1
commit 35211b7f25
No known key found for this signature in database

View file

@ -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 });