From 04e2d5ceaf92ccc29b7f52f8343ebcb7837cdbe6 Mon Sep 17 00:00:00 2001 From: zero01101 Date: Wed, 21 Feb 2024 23:20:27 +0000 Subject: [PATCH] Prettified Code! --- index.html | 2 +- js/ui/tool/dream.js | 25 ++++++++++++++----------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/index.html b/index.html index e2613c3..101f750 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ - + diff --git a/js/ui/tool/dream.js b/js/ui/tool/dream.js index a93fec9..669b4e7 100644 --- a/js/ui/tool/dream.js +++ b/js/ui/tool/dream.js @@ -62,9 +62,12 @@ const _monitorProgress = (bb, oncheck = null) => { } const timeSpent = performance.now() - init; - setTimeout(() => { - if (running) _checkProgress(); - }, Math.max(0, minDelay - timeSpent)); + setTimeout( + () => { + if (running) _checkProgress(); + }, + Math.max(0, minDelay - timeSpent) + ); }; _checkProgress(); @@ -1845,8 +1848,8 @@ const dreamTool = () => state.cursorSize > stableDiffusionData.width ? "#FBB5" : state.cursorSize < stableDiffusionData.width - ? "#BFB5" - : "#FFF5"; + ? "#BFB5" + : "#FFF5"; state.erasePrevReticle = _tool._reticle_draw( bb, @@ -1873,8 +1876,8 @@ const dreamTool = () => state.cursorSize > stableDiffusionData.width ? "#FBB5" : state.cursorSize < stableDiffusionData.width - ? "#BFB5" - : "#FFF5"; + ? "#BFB5" + : "#FFF5"; state.erasePrevReticle = _tool._reticle_draw( getBoundingBox( evn.x, @@ -2389,8 +2392,8 @@ const img2imgTool = () => state.cursorSize > stableDiffusionData.width ? "#FBB5" : state.cursorSize < stableDiffusionData.width - ? "#BFB5" - : "#FFF5"; + ? "#BFB5" + : "#FFF5"; state.erasePrevReticle = _tool._reticle_draw( bb, "Img2Img", @@ -2427,8 +2430,8 @@ const img2imgTool = () => state.cursorSize > stableDiffusionData.width ? "#FBB5" : state.cursorSize < stableDiffusionData.width - ? "#BFB5" - : "#FFF5"; + ? "#BFB5" + : "#FFF5"; state.erasePrevReticle = _tool._reticle_draw( bb, "Img2Img",