mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-08-09 07:45:01 +02:00
Make JPEG Output quality user controllable (#607)
Add a slider to the image options for the JPEG quality For PNG images, the slider is hidden.
This commit is contained in:
@ -347,6 +347,16 @@ function asyncDelay(timeout) {
|
||||
})
|
||||
}
|
||||
|
||||
/* Simple debounce function, placeholder for the one in engine.js for simple use cases */
|
||||
function debounce(func, timeout = 300){
|
||||
let timer;
|
||||
return (...args) => {
|
||||
clearTimeout(timer);
|
||||
timer = setTimeout(() => { func.apply(this, args); }, timeout);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
function preventNonNumericalInput(e) {
|
||||
e = e || window.event;
|
||||
let charCode = (typeof e.which == "undefined") ? e.keyCode : e.which;
|
||||
|
Reference in New Issue
Block a user