mirror of
https://github.com/Azornes/Comfyui-LayerForge.git
synced 2026-03-21 20:52:12 -03:00
Remove CanvasState delegating methods from Canvas
Removed delegating methods to CanvasState from Canvas.js and updated all references to use canvas.canvasState directly for state operations (undo, redo, saveStateToDB). Updated CanvasInteractions.js, CanvasIO.js, CanvasLayers.js, and CanvasView.js accordingly. Updated REFACTORING_GUIDE.md to reflect the completion of this refactor.
This commit is contained in:
@@ -469,11 +469,11 @@ export class Canvas {
|
||||
* - this.canvasInteractions dla obsługi interakcji
|
||||
* - this.canvasIO dla operacji I/O
|
||||
* - this.canvasState dla zarządzania stanem
|
||||
*
|
||||
* UWAGA: Metody delegujące do CanvasState zostały usunięte.
|
||||
* Używaj: canvas.canvasState.saveStateToDB(), canvas.canvasState.undo(), etc.
|
||||
*/
|
||||
|
||||
// Delegacje do CanvasState
|
||||
async saveStateToDB(immediate = false) { return this.canvasState.saveStateToDB(immediate); }
|
||||
|
||||
// Delegacje do CanvasLayers
|
||||
async copySelectedLayers() { return this.canvasLayers.copySelectedLayers(); }
|
||||
async handlePaste(addMode) { return this.canvasLayers.handlePaste(addMode); }
|
||||
|
||||
Reference in New Issue
Block a user