mirror of
https://github.com/vladmandic/automatic
synced 2026-09-04 03:50:44 +02:00
enable full resize opts in hires
This commit is contained in:
+16
-14
@@ -421,21 +421,23 @@ function setupExtraNetworksForTab(tabname) {
|
||||
// card hover
|
||||
let hoverTimer = null;
|
||||
let previousCard = null;
|
||||
gradioApp().getElementById(`${tabname}_extra_tabs`).onmouseover = (e) => {
|
||||
const el = e.target.closest('.card'); // bubble-up to card
|
||||
if (!el || (el.title === previousCard)) return;
|
||||
if (!hoverTimer) {
|
||||
hoverTimer = setTimeout(() => {
|
||||
readCardDescription(el.dataset.page, el.dataset.name);
|
||||
readCardTags(el, el.dataset.tags);
|
||||
previousCard = el.title;
|
||||
}, 300);
|
||||
}
|
||||
el.onmouseout = () => {
|
||||
clearTimeout(hoverTimer);
|
||||
hoverTimer = null;
|
||||
if (window.opts.extra_networks_fetch) {
|
||||
gradioApp().getElementById(`${tabname}_extra_tabs`).onmouseover = async (e) => {
|
||||
const el = e.target.closest('.card'); // bubble-up to card
|
||||
if (!el || (el.title === previousCard)) return;
|
||||
if (!hoverTimer) {
|
||||
hoverTimer = setTimeout(() => {
|
||||
readCardDescription(el.dataset.page, el.dataset.name);
|
||||
readCardTags(el, el.dataset.tags);
|
||||
previousCard = el.title;
|
||||
}, 300);
|
||||
}
|
||||
el.onmouseout = () => {
|
||||
clearTimeout(hoverTimer);
|
||||
hoverTimer = null;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
// en style
|
||||
if (!en) return;
|
||||
|
||||
@@ -17,7 +17,6 @@ async function initStartup() {
|
||||
initImageViewer();
|
||||
initGallery();
|
||||
setupControlUI();
|
||||
setupExtraNetworks();
|
||||
|
||||
// reconnect server session
|
||||
await reconnectUI();
|
||||
@@ -25,6 +24,7 @@ async function initStartup() {
|
||||
// make sure all of the ui is ready and options are loaded
|
||||
while (Object.keys(window.opts).length === 0) await sleep(50);
|
||||
executeCallbacks(uiReadyCallbacks);
|
||||
setupExtraNetworks();
|
||||
|
||||
// optinally wait for modern ui
|
||||
if (window.waitForUiReady) await waitForUiReady();
|
||||
|
||||
Reference in New Issue
Block a user