fix touch resize

This commit is contained in:
Til Schmitter 2026-06-03 15:16:45 +02:00
parent 93fc7184ac
commit 1d415b73b8
2 changed files with 5 additions and 3 deletions

View file

@ -2117,6 +2117,7 @@ html {
opacity: 0;
background: #8888;
cursor: ew-resize;
touch-action: none;
}
#reszbar:hover{
opacity: .6;

View file

@ -11252,7 +11252,8 @@ function reload_browser() {
}
resizing = true;
clmod(ebi('tree'), 'resz', true);
ev(e);
if(e.cancelable)
ev(e);
return;
}
if (e.button !== 0 && e.type !== 'touchstart') return;
@ -11293,13 +11294,13 @@ function reload_browser() {
}
function sel_move(e) {
var pos = getpp(e);
if(resizing){
var em2px = parseFloat(getComputedStyle(document.body).fontSize);
treectl.settreesize(e.clientX / em2px);
treectl.settreesize(getpp(e).x / em2px);
return;
}
if (!is_selma) return;
var pos = getpp(e);
var dist = Math.sqrt(Math.pow(pos.x - startx, 2) + Math.pow(pos.y - starty, 2));
if (e.type === 'touchmove' && ttimer) {