Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
stable-diffusion-webui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
stable-diffusion-webui
Commits
b5693699
Commit
b5693699
authored
Sep 20, 2022
by
Connum
Committed by
AUTOMATIC1111
Sep 21, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Reset image input when dragover new image"
This reverts commit
9035afba
.
parent
e9ba2d42
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
16 deletions
+1
-16
dragdrop.js
javascript/dragdrop.js
+1
-16
No files found.
javascript/dragdrop.js
View file @
b5693699
...
...
@@ -40,15 +40,6 @@ function dropReplaceImage( imgWrap, files ) {
}
}
function
pressClearBtn
(
hoverElems
)
{
//Find all buttons hovering over the image box
let
btns
=
Array
.
from
(
hoverElems
.
querySelectorAll
(
"button"
))
//Press the last btn which will be the X button
if
(
btns
.
length
)
btns
[
btns
.
length
-
1
].
click
()
}
window
.
document
.
addEventListener
(
'dragover'
,
e
=>
{
const
target
=
e
.
composedPath
()[
0
];
const
imgWrap
=
target
.
closest
(
'[data-testid="image"]'
);
...
...
@@ -57,13 +48,7 @@ window.document.addEventListener('dragover', e => {
}
e
.
stopPropagation
();
e
.
preventDefault
();
if
(
e
.
dataTransfer
)
e
.
dataTransfer
.
dropEffect
=
'copy'
;
//If is gr.Interface clear image on hover
if
(
target
.
previousElementSibling
)
pressClearBtn
(
target
.
previousElementSibling
)
});
window
.
document
.
addEventListener
(
'drop'
,
e
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment