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:
Dariusz L
2025-06-29 20:43:02 +02:00
parent 0b3bdaf769
commit 8efb9d91b0
2 changed files with 11 additions and 41 deletions

View File

@@ -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;
}
}