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

Function makeResolutionButtons

ui/media/js/main.js:3082–3094  ·  view source on GitHub ↗
(listElement, resolutionList)

Source from the content-addressed store, hash-verified

3080 ///// Init resolutions dropdown
3081
3082 function makeResolutionButtons(listElement, resolutionList) {
3083 listElement.innerHTML = ""
3084 resolutionList.forEach((el) => {
3085 let button = createElement("button", { style: "width: 8em;" }, "tertiaryButton", `${el.w}×${el.h}`)
3086 button.addEventListener("click", () => {
3087 customWidthField.value = el.w
3088 customHeightField.value = el.h
3089 hidePopup()
3090 })
3091 listElement.appendChild(button)
3092 listElement.appendChild(document.createElement("br"))
3093 })
3094 }
3095
3096 enlargeButtons.querySelectorAll("button").forEach((button) =>
3097 button.addEventListener("click", (e) => {

Callers 1

main.jsFile · 0.85

Calls 4

createElementFunction · 0.85
hidePopupFunction · 0.85
addEventListenerMethod · 0.45
appendChildMethod · 0.45

Tested by

no test coverage detected