diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2024-02-26 09:52:34 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2024-03-02 03:54:44 +0000 |
commit | b47756385d3fbd851ff52507cfa392807556c330 (patch) | |
tree | bfadb47c333e723503a517e0620a4d21b63a53aa /javascript/resizeHandle.js | |
parent | eaf5e0289a2e71d39322c6258a1e2d7dc1fd2e34 (diff) | |
download | stable-diffusion-webui-gfx803-b47756385d3fbd851ff52507cfa392807556c330.tar.gz stable-diffusion-webui-gfx803-b47756385d3fbd851ff52507cfa392807556c330.tar.bz2 stable-diffusion-webui-gfx803-b47756385d3fbd851ff52507cfa392807556c330.zip |
Merge pull request #15010 from light-and-ray/fix_resize-handle_for_vertical_layout
Fix resize-handle visability for vertical layout (mobile)
Diffstat (limited to 'javascript/resizeHandle.js')
-rw-r--r-- | javascript/resizeHandle.js | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/javascript/resizeHandle.js b/javascript/resizeHandle.js index cd3e68c6..6560372c 100644 --- a/javascript/resizeHandle.js +++ b/javascript/resizeHandle.js @@ -22,15 +22,11 @@ function displayResizeHandle(parent) { if (window.innerWidth < GRADIO_MIN_WIDTH * 2 + PAD * 4) { parent.style.display = 'flex'; - if (R.handle != null) { - R.handle.style.opacity = '0'; - } + parent.resizeHandle.style.display = "none"; return false; } else { parent.style.display = 'grid'; - if (R.handle != null) { - R.handle.style.opacity = '100'; - } + parent.resizeHandle.style.display = "block"; return true; } } @@ -65,6 +61,7 @@ const resizeHandle = document.createElement('div'); resizeHandle.classList.add('resize-handle'); parent.insertBefore(resizeHandle, rightCol); + parent.resizeHandle = resizeHandle; ['mousedown', 'touchstart'].forEach((eventType) => { resizeHandle.addEventListener(eventType, (evt) => { @@ -82,7 +79,6 @@ R.tracking = true; R.parent = parent; R.parentWidth = parent.offsetWidth; - R.handle = resizeHandle; R.leftCol = leftCol; R.leftColStartWidth = leftCol.offsetWidth; if (eventType.startsWith('mouse')) { |