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

Function undoRemove

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

Source from the content-addressed store, hash-verified

374}
375
376function undoRemove() {
377 let data = undoBuffer.pop()
378 if (!data) {
379 return
380 }
381 if (data.next == null) {
382 data.parent.appendChild(data.element)
383 } else {
384 data.parent.insertBefore(data.element, data.next)
385 }
386 if (data.doubleUndo) {
387 undoRemove()
388 }
389 if (undoBuffer.length == 0) {
390 undoButton.classList.add("displayNone")
391 }
392 updateInitialText()
393}
394
395undoButton.addEventListener("click", () => {
396 undoRemove()

Callers 1

main.jsFile · 0.85

Calls 3

updateInitialTextFunction · 0.85
appendChildMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected