mirror of
https://github.com/Azornes/Comfyui-LayerForge.git
synced 2026-03-24 22:12:17 -03:00
Remove legacy delegating methods from Canvas.js
Removed all remaining delegating methods from Canvas.js, including handleMouseMove and garbage collection helpers, as part of finalizing the refactor to a pure facade. Updated REFACTORING_GUIDE.md to reflect the completion of this refactor and clarify the new architecture.
This commit is contained in:
37
js/Canvas.js
37
js/Canvas.js
@@ -457,41 +457,4 @@ export class Canvas {
|
||||
|
||||
this.render();
|
||||
}
|
||||
|
||||
// ==========================================
|
||||
// METODY DELEGUJĄCE DLA KOMPATYBILNOŚCI
|
||||
// ==========================================
|
||||
|
||||
/**
|
||||
* Te metody są zachowane tymczasowo dla kompatybilności wstecznej.
|
||||
* W nowych implementacjach należy używać bezpośrednio odpowiednich modułów:
|
||||
* - this.canvasLayers dla operacji na warstwach
|
||||
* - this.canvasInteractions dla obsługi interakcji
|
||||
* - this.canvasIO dla operacji I/O
|
||||
* - this.canvasState dla zarządzania stanem
|
||||
*
|
||||
* UWAGA: Metody delegujące do CanvasLayers i CanvasState zostały usunięte.
|
||||
* Używaj: canvas.canvasLayers.copySelectedLayers(), canvas.canvasState.undo(), etc.
|
||||
*/
|
||||
|
||||
// Delegacje do CanvasInteractions
|
||||
handleMouseMove(e) { this.canvasInteractions.handleMouseMove(e); }
|
||||
|
||||
// Delegacje do ImageReferenceManager
|
||||
async runGarbageCollection() {
|
||||
if (this.imageReferenceManager) {
|
||||
await this.imageReferenceManager.manualGarbageCollection();
|
||||
}
|
||||
}
|
||||
getGarbageCollectionStats() {
|
||||
if (this.imageReferenceManager) {
|
||||
const stats = this.imageReferenceManager.getStats();
|
||||
return {
|
||||
...stats,
|
||||
operationCount: this.imageReferenceManager.operationCount,
|
||||
operationThreshold: this.imageReferenceManager.operationThreshold
|
||||
};
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user