zero01101 / openOutpaint

local offline javascript and html canvas outpainting gizmo for stable diffusion webUI API 🐠
MIT License
499 stars 43 forks source link

fixes issue 167? #172

Closed zero01101 closed 1 year ago

zero01101 commented 1 year ago

so like i think that i'm doing this REALLY WRONG :( i tried replacing the contents of the autoselect with a refreshed list of models but no matter what idiocy i applied, i ran into duplicated observers/handlers or truncated option lists until i manually cleared out the input field... i mean it when i say i'm kinda dumb lol :D on that topic, this is also unpleasantly duplicated from the instantiation of the autoselect option element, but i tried to extract that into a repeatable function and that just ruined the context of the thing... plus the fact that i changed it from a const to a let so that may have inadvertently damaged something but i somewhat doubt that...

ANYWAY please point and laugh and say "wtf are you even doing you dummy, you just call updateOptionsWithoutAlertOrCallback()" or whatever lol

regarding "fixes", i'm only really concerned about the model refresh; i think squarize should probably be its own feature request if that's even something worth pursuing and i am truly just a cranky old man

also it's really embarrassing to be stuck on something like this right after you unleashed rotation and scaling holy crap lol

seijihariki commented 1 year ago

I think recreating the div is not really necessary... Some minor changes would be required to some functions, but I think it would be a cleaner solution:

seijihariki commented 1 year ago

We should add a button with a proper icon too... Browsers with a different font may have problems rendering the button. Maybe move the button to the right of the field, as with the connection indicator.

zero01101 commented 1 year ago

moved the button to the right of the model selector and you're definitely right, it's much better over there. also updated it to a lucide SVG refresh icon for consistency, and did some crimes to ui.js and various CSS to get the button to live in the wrapper div comfortably :badpokerface:

please slap me around with a large trout if horrible <3