Images can now be uploaded by dragging from another window in chromium.
This commit is contained in:
parent
a5599ed42c
commit
5ac96897e9
|
@ -433,7 +433,7 @@ export const ComfyWidgets = {
|
||||||
// Add handler to check if an image is being dragged over our node
|
// Add handler to check if an image is being dragged over our node
|
||||||
node.onDragOver = function (e) {
|
node.onDragOver = function (e) {
|
||||||
if (e.dataTransfer && e.dataTransfer.items) {
|
if (e.dataTransfer && e.dataTransfer.items) {
|
||||||
const image = [...e.dataTransfer.items].find((f) => f.kind === "file" && f.type.startsWith("image/"));
|
const image = [...e.dataTransfer.items].find((f) => f.kind === "file");
|
||||||
return !!image;
|
return !!image;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue