mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-04-24 22:09:00 +08:00
fix lint and console warning
This commit is contained in:
parent
85abbbb8fa
commit
ab1e0fa9bf
@ -111,13 +111,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (R.tracking) {
|
if (R.tracking) {
|
||||||
|
if (eventType.startsWith('mouse')) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
|
}
|
||||||
evt.stopPropagation();
|
evt.stopPropagation();
|
||||||
|
|
||||||
|
let delta = 0;
|
||||||
if (eventType.startsWith('mouse')) {
|
if (eventType.startsWith('mouse')) {
|
||||||
var delta = R.screenX - evt.screenX;
|
delta = R.screenX - evt.screenX;
|
||||||
} else {
|
} else {
|
||||||
var delta = R.screenX - evt.changedTouches[0].screenX;
|
delta = R.screenX - evt.changedTouches[0].screenX;
|
||||||
}
|
}
|
||||||
const leftColWidth = Math.max(Math.min(R.leftColStartWidth - delta, R.parent.offsetWidth - GRADIO_MIN_WIDTH - PAD), GRADIO_MIN_WIDTH);
|
const leftColWidth = Math.max(Math.min(R.leftColStartWidth - delta, R.parent.offsetWidth - GRADIO_MIN_WIDTH - PAD), GRADIO_MIN_WIDTH);
|
||||||
setLeftColGridTemplate(R.parent, leftColWidth);
|
setLeftColGridTemplate(R.parent, leftColWidth);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user