Set style.height of Gallery for older Gradio
parent
6e177e3b82
commit
03095102da
|
|
@ -232,6 +232,20 @@ onUiLoaded(async () => {
|
|||
ia_cn_out_image: "#ia_cn_out_image",
|
||||
};
|
||||
|
||||
function setStyleHeight(elemId, height) {
|
||||
const elem = gradioApp().querySelector(elemId);
|
||||
if (elem) {
|
||||
if (elem.style.height === null || elem.style.height === "") {
|
||||
elem.style.height = height;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setStyleHeight(elementIDs.ia_out_image, "520px");
|
||||
setStyleHeight(elementIDs.ia_cleaner_out_image, "520px");
|
||||
setStyleHeight(elementIDs.ia_webui_out_image, "520px");
|
||||
setStyleHeight(elementIDs.ia_cn_out_image, "520px");
|
||||
|
||||
// Default config
|
||||
const defaultHotkeysConfig = {
|
||||
canvas_hotkey_reset: "KeyR",
|
||||
|
|
|
|||
Loading…
Reference in New Issue