mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-01-01 06:40:57 -08:00
Add drag/drop param loading.
Drop an image or generational text onto the prompt bar, it loads the info for parsing.
This commit is contained in:
parent
cc5803603b
commit
54e0051bdd
4 changed files with 74 additions and 1 deletions
3
javascript/dragdrop.js
vendored
3
javascript/dragdrop.js
vendored
|
|
@ -53,6 +53,9 @@ window.document.addEventListener('dragover', e => {
|
|||
|
||||
window.document.addEventListener('drop', e => {
|
||||
const target = e.composedPath()[0];
|
||||
if (target.placeholder === "Prompt") {
|
||||
return;
|
||||
}
|
||||
const imgWrap = target.closest('[data-testid="image"]');
|
||||
if ( !imgWrap ) {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue