mirror of
https://github.com/9001/copyparty.git
synced 2026-06-21 13:42:29 -06:00
fix touch resize
This commit is contained in:
parent
93fc7184ac
commit
1d415b73b8
|
|
@ -2117,6 +2117,7 @@ html {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
background: #8888;
|
background: #8888;
|
||||||
cursor: ew-resize;
|
cursor: ew-resize;
|
||||||
|
touch-action: none;
|
||||||
}
|
}
|
||||||
#reszbar:hover{
|
#reszbar:hover{
|
||||||
opacity: .6;
|
opacity: .6;
|
||||||
|
|
|
||||||
|
|
@ -11252,7 +11252,8 @@ function reload_browser() {
|
||||||
}
|
}
|
||||||
resizing = true;
|
resizing = true;
|
||||||
clmod(ebi('tree'), 'resz', true);
|
clmod(ebi('tree'), 'resz', true);
|
||||||
ev(e);
|
if(e.cancelable)
|
||||||
|
ev(e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (e.button !== 0 && e.type !== 'touchstart') return;
|
if (e.button !== 0 && e.type !== 'touchstart') return;
|
||||||
|
|
@ -11293,13 +11294,13 @@ function reload_browser() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function sel_move(e) {
|
function sel_move(e) {
|
||||||
var pos = getpp(e);
|
|
||||||
if(resizing){
|
if(resizing){
|
||||||
var em2px = parseFloat(getComputedStyle(document.body).fontSize);
|
var em2px = parseFloat(getComputedStyle(document.body).fontSize);
|
||||||
treectl.settreesize(e.clientX / em2px);
|
treectl.settreesize(getpp(e).x / em2px);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!is_selma) 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));
|
var dist = Math.sqrt(Math.pow(pos.x - startx, 2) + Math.pow(pos.y - starty, 2));
|
||||||
|
|
||||||
if (e.type === 'touchmove' && ttimer) {
|
if (e.type === 'touchmove' && ttimer) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue