MCPcopy Index your code
hub / github.com/easydiffusion/easydiffusion / controlImageLoad

Function controlImageLoad

ui/media/js/main.js:2546–2559  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2544}
2545
2546function controlImageLoad() {
2547 let w = controlImagePreview.naturalWidth
2548 let h = controlImagePreview.naturalHeight
2549 w = w - (w % IMAGE_STEP_SIZE)
2550 h = h - (h % IMAGE_STEP_SIZE)
2551
2552 addImageSizeOption(w)
2553 addImageSizeOption(h)
2554
2555 widthField.value = w
2556 heightField.value = h
2557 widthField.dispatchEvent(new Event("change"))
2558 heightField.dispatchEvent(new Event("change"))
2559}
2560controlImagePreview.addEventListener("load", controlImageLoad)
2561
2562function controlImageUnload() {

Callers

nothing calls this directly

Calls 2

addImageSizeOptionFunction · 0.85
dispatchEventMethod · 0.45

Tested by

no test coverage detected