mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-08-15 18:53:02 +02:00
croppr ui
This commit is contained in:
@ -678,8 +678,14 @@ function onUseAsThumbnailClick(req, img) {
|
|||||||
|
|
||||||
useAsThumbDialog.showModal()
|
useAsThumbDialog.showModal()
|
||||||
useAsThumbImage.src = img.src
|
useAsThumbImage.src = img.src
|
||||||
|
img.width = img.height = 512
|
||||||
|
|
||||||
var croppr = new Croppr('#croppr', { aspectRatio: 1, minSize: [384,384,'px'], startSize: [100, 100, '%'], returnMode:"real" })
|
var croppr = new Croppr(useAsThumbImage, { aspectRatio: 1, minSize: [384,384,'px'], startSize: [100, 100, '%'], returnMode:"real" })
|
||||||
|
|
||||||
|
useAsThumbDialog.addEventListener("blur", () => {
|
||||||
|
console.log("blur")
|
||||||
|
croppr.destroy
|
||||||
|
})
|
||||||
|
|
||||||
// fetch(img.src)
|
// fetch(img.src)
|
||||||
// .then(response => response.blob())
|
// .then(response => response.blob())
|
||||||
@ -691,6 +697,10 @@ function onUseAsThumbnailClick(req, img) {
|
|||||||
// })
|
// })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
modalDialogCloseOnBackdropClick(useAsThumbDialog)
|
||||||
|
makeDialogDraggable(useAsThumbDialog)
|
||||||
|
|
||||||
|
|
||||||
function enqueueImageVariationTask(req, img, reqDiff) {
|
function enqueueImageVariationTask(req, img, reqDiff) {
|
||||||
const imageSeed = img.getAttribute("data-seed")
|
const imageSeed = img.getAttribute("data-seed")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user