Prettified Code!

This commit is contained in:
zero01101 2024-02-21 23:20:27 +00:00 committed by GitHub Action
parent 3174f1e424
commit 04e2d5ceaf
2 changed files with 15 additions and 12 deletions

View file

@ -1,4 +1,4 @@
<!DOCTYPE html> <!doctype html>
<html lang="en-US"> <html lang="en-US">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />

View file

@ -62,9 +62,12 @@ const _monitorProgress = (bb, oncheck = null) => {
} }
const timeSpent = performance.now() - init; const timeSpent = performance.now() - init;
setTimeout(() => { setTimeout(
if (running) _checkProgress(); () => {
}, Math.max(0, minDelay - timeSpent)); if (running) _checkProgress();
},
Math.max(0, minDelay - timeSpent)
);
}; };
_checkProgress(); _checkProgress();
@ -1845,8 +1848,8 @@ const dreamTool = () =>
state.cursorSize > stableDiffusionData.width state.cursorSize > stableDiffusionData.width
? "#FBB5" ? "#FBB5"
: state.cursorSize < stableDiffusionData.width : state.cursorSize < stableDiffusionData.width
? "#BFB5" ? "#BFB5"
: "#FFF5"; : "#FFF5";
state.erasePrevReticle = _tool._reticle_draw( state.erasePrevReticle = _tool._reticle_draw(
bb, bb,
@ -1873,8 +1876,8 @@ const dreamTool = () =>
state.cursorSize > stableDiffusionData.width state.cursorSize > stableDiffusionData.width
? "#FBB5" ? "#FBB5"
: state.cursorSize < stableDiffusionData.width : state.cursorSize < stableDiffusionData.width
? "#BFB5" ? "#BFB5"
: "#FFF5"; : "#FFF5";
state.erasePrevReticle = _tool._reticle_draw( state.erasePrevReticle = _tool._reticle_draw(
getBoundingBox( getBoundingBox(
evn.x, evn.x,
@ -2389,8 +2392,8 @@ const img2imgTool = () =>
state.cursorSize > stableDiffusionData.width state.cursorSize > stableDiffusionData.width
? "#FBB5" ? "#FBB5"
: state.cursorSize < stableDiffusionData.width : state.cursorSize < stableDiffusionData.width
? "#BFB5" ? "#BFB5"
: "#FFF5"; : "#FFF5";
state.erasePrevReticle = _tool._reticle_draw( state.erasePrevReticle = _tool._reticle_draw(
bb, bb,
"Img2Img", "Img2Img",
@ -2427,8 +2430,8 @@ const img2imgTool = () =>
state.cursorSize > stableDiffusionData.width state.cursorSize > stableDiffusionData.width
? "#FBB5" ? "#FBB5"
: state.cursorSize < stableDiffusionData.width : state.cursorSize < stableDiffusionData.width
? "#BFB5" ? "#BFB5"
: "#FFF5"; : "#FFF5";
state.erasePrevReticle = _tool._reticle_draw( state.erasePrevReticle = _tool._reticle_draw(
bb, bb,
"Img2Img", "Img2Img",