Prettified Code!

This commit is contained in:
zero01101 2023-03-12 15:27:32 +00:00 committed by GitHub Action
parent f8ca9800c9
commit d8ec2c0d0a

View file

@ -501,7 +501,7 @@ const _generate = async (endpoint, request, bb, options = {}) => {
} else {
prevImg();
}
}
};
const nextImg = () => {
at++;
@ -522,16 +522,14 @@ const _generate = async (endpoint, request, bb, options = {}) => {
} else {
nextImg();
}
}
};
const activateImgAt = (at) => {
updateImageIndexText();
var seed = seeds[at];
seedbtn.title = "Use seed " + seed;
redraw();
}
};
const applyImg = async () => {
if (!images[at]) return;
@ -648,7 +646,7 @@ const _generate = async (endpoint, request, bb, options = {}) => {
}
at = nextIndex;
activateImgAt(at);
}
};
const prevMarkedImg = () => {
var nextIndex = getPrevMarkedImage(at);
@ -665,7 +663,7 @@ const _generate = async (endpoint, request, bb, options = {}) => {
}
at = nextIndex;
activateImgAt(at);
}
};
const getNextMarkedImage = (at) => {
for (let i = at + 1; i < markedImages.length; i++) {
@ -674,7 +672,6 @@ const _generate = async (endpoint, request, bb, options = {}) => {
}
}
return null;
};
const getPrevMarkedImage = (at) => {
@ -688,9 +685,10 @@ const _generate = async (endpoint, request, bb, options = {}) => {
const updateImageIndexText = () => {
var markedImageIndicator = markedImages[at] == true ? "*" : "";
imageindextxt.textContent = `${markedImageIndicator}${at}/${images.length - 1}`;
}
imageindextxt.textContent = `${markedImageIndicator}${at}/${
images.length - 1
}`;
};
const makeMore = async () => {
const moreQ = await waitQueue();
@ -869,7 +867,6 @@ const _generate = async (endpoint, request, bb, options = {}) => {
const onwheelhandler = mouse.listen.world.onwheel.on(
(evn, state) => {
if (!state.dream_processed && bb.contains(evn.x, evn.y)) {
if (evn.delta < 0) {
nextImgEvent(evn.evn);
} else prevImgEvent(evn.evn);