mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-24 06:32:12 -03:00
Refactor panel position management and enhance recipe card handling
- Removed redundant updatePanelPositions calls from various components and centralized the logic in the uiHelpers.js for better maintainability. - Introduced appendRecipeCards function in RecipeManager to streamline the addition of recipe cards from search results. - Cleaned up unused code related to search input handling and recipe loading, improving overall code clarity and performance. - Updated HeaderManager and SearchManager to utilize the new updatePanelPositions function, ensuring consistent panel positioning across the application.
This commit is contained in:
@@ -5,7 +5,7 @@ import { modalManager } from './managers/ModalManager.js';
|
||||
import { updateService } from './managers/UpdateService.js';
|
||||
import { HeaderManager } from './components/Header.js';
|
||||
import { SettingsManager } from './managers/SettingsManager.js';
|
||||
import { showToast, initTheme, initBackToTop, updatePanelPositions, lazyLoadImages } from './utils/uiHelpers.js';
|
||||
import { showToast, initTheme, initBackToTop, lazyLoadImages } from './utils/uiHelpers.js';
|
||||
import { initializeInfiniteScroll } from './utils/infiniteScroll.js';
|
||||
|
||||
// Core application class
|
||||
@@ -30,12 +30,6 @@ export class AppCore {
|
||||
initTheme();
|
||||
initBackToTop();
|
||||
|
||||
// Set up event listeners
|
||||
window.addEventListener('resize', updatePanelPositions);
|
||||
|
||||
// Initial positioning
|
||||
updatePanelPositions();
|
||||
|
||||
// Mark as initialized
|
||||
this.initialized = true;
|
||||
|
||||
@@ -66,9 +60,6 @@ export class AppCore {
|
||||
initializeInfiniteScroll(pageType);
|
||||
}
|
||||
|
||||
// Update panel positions
|
||||
updatePanelPositions();
|
||||
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user