mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-08-03 19:02:27 +00: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:
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;
|
||||
|
Reference in New Issue
Block a user