Commit Graph

213 Commits

Author SHA1 Message Date
Dariusz L
9e4da30b59 Add auto-refresh toggle after image generation
Introduces an 'Auto-refresh after generation' toggle to the Canvas. When enabled, the latest image is automatically imported after a successful execution event. Also ensures event listeners are properly cleaned up when the node is removed.
2025-07-03 01:02:35 +02:00
Dariusz L
2f730c87fa Change default log level and bump version
Set the default log level to NONE in createModuleLogger to reduce logging output. Incremented the project version to 1.3.3.1 in pyproject.toml.
v1.3.3.1
2025-07-02 11:18:47 +02:00
Dariusz L
aca1f4e422 Update pyproject.toml v1.3.3 2025-07-02 10:37:39 +02:00
Dariusz L
195e25437a Improve matting error handling and user feedback
Adds checks for missing 'transformers' dependency and network errors in the matting endpoint, returning clear error messages for common failure cases. Updates the frontend to display more informative alerts to users when matting fails, including details from server responses.
2025-07-02 10:36:22 +02:00
Dariusz L
d1004d5864 Notify layers panel on layer changes
Added calls to canvasLayersPanel.onLayersChanged() after pasting, adding, and fusing layers to ensure the layers panel updates its view in response to these actions.
2025-07-02 10:16:59 +02:00
Dariusz L
d2ccfc4e20 Update undo/redo button handlers in CanvasView
Changed the undo and redo button onclick handlers to call canvas.undo() and canvas.redo() instead of canvas.canvasState.undo() and canvas.canvasState.redo(). This aligns the button actions with the updated canvas API.
2025-07-02 10:08:32 +02:00
Dariusz L
2c313f43e8 Enable keyboard delete in layers panel
Added keyboard event listener to allow deleting selected layers using the Delete or Backspace keys when the layers panel is focused. This improves accessibility and user experience.
2025-07-02 10:05:54 +02:00
Dariusz L
2636521026 Remove keyboard event handling from layers panel
Eliminated tabindex and keydown event listener from the CanvasLayersPanel container. Keyboard interactions are no longer handled directly in this panel.
2025-07-02 10:00:30 +02:00
Dariusz L
e0a4549321 Refactor tooltip positioning logic in CanvasView
Extracted tooltip positioning code into reusable showTooltip and hideTooltip helper functions. Updated event handlers to use these helpers, reducing code duplication and improving maintainability.
2025-07-02 09:53:35 +02:00
Dariusz L
29ab916759 Refactor layers panel UI and improve resize handling
Changed UI text in CanvasLayersPanel from Polish to English and removed the add layer button and its logic. Moved and improved the ResizeObserver logic in CanvasView.js to update both the canvas and layers panel positions dynamically based on the controls' height.
2025-07-02 09:40:21 +02:00
Dariusz L
ac21aa9579 Enable keyboard interaction in layers panel
Added tabIndex to the panel container to allow keyboard focus and attached a keydown event listener to forward keyboard events to the main interaction handler. This improves accessibility and enables keyboard-based layer deletion from the panel.
2025-07-02 09:33:13 +02:00
Dariusz L
cae24310db Adjust canvas and panel layout widths
Reduced the right margin of the canvas from 320px to 270px and the panel width from 300px to 250px to optimize space allocation in the UI.
2025-07-02 09:25:33 +02:00
Dariusz L
7d8fd30bbf Add snap-to-5° rotation with Shift+Ctrl+Mouse Wheel
Introduces a new shortcut (Shift + Ctrl + Mouse Wheel) to snap layer rotation to the nearest 5° increment. Updates the CanvasView help table to document this new functionality and clarifies the description for existing rotation shortcuts.
2025-07-02 09:21:47 +02:00
Dariusz L
244d48728c Refactor canvas interactions and update keyboard shortcuts
Reorganizes mouse and keyboard event handling in CanvasInteractions for clearer priority and improved usability. Adds global keyboard shortcuts for undo, redo, copy, and paste. Updates context-sensitive shortcuts to support both Delete and Backspace for layer removal. Refactors CanvasLayers to use delayed state saving via requestSaveState. Updates CanvasView shortcut documentation to reflect these changes and clarify mouse/keyboard actions.
2025-07-02 09:16:16 +02:00
Dariusz L
ef01be3323 Add canvas move and resize interactions
Implemented new interaction modes for moving and resizing the canvas using shift and alt modifiers. Added corresponding handlers for mouse events to support these actions.
2025-07-02 08:48:41 +02:00
Dariusz L
b3d1206f3f Refactor layer selection and movement logic
Centralizes layer movement logic in CanvasLayers with a new moveLayers function, supporting both up/down and drag-and-drop reordering. Updates selection logic in Canvas to only trigger updates when selection changes, and improves event handling in CanvasLayersPanel for more responsive selection and drag operations. Removes redundant moveLayersToPosition method in favor of the new unified approach.
2025-07-02 08:41:18 +02:00
Dariusz L
a73a3dcf96 Add layers panel UI and improve layer management
Introduces a new CanvasLayersPanel component for managing layers visually, including selection, renaming, reordering via drag-and-drop, and deletion. Integrates the panel into the main Canvas and CanvasView, synchronizes selection and state changes, and adds logic for duplicating layers and debounced state saving. Moves IndexedDB state saving to a Web Worker for better performance. Also sets default logger level to DEBUG for improved diagnostics.
2025-07-02 08:09:49 +02:00
Dariusz L
53aa35491e Add layer fusion (flatten/merge) feature
Introduces a new 'Fuse' button to the canvas UI, allowing users to flatten and merge multiple selected layers into a single layer. The implementation handles bounding box calculation, z-index ordering, and updates the canvas state and selection accordingly. The fuse button is enabled only when at least two layers are selected.
2025-07-02 00:42:38 +02:00
Dariusz L
b3b901a8d6 Update pyproject.toml v1.3.1 2025-07-02 00:22:22 +02:00
Dariusz L
826f448af9 Add documentation for core modules and update Canvas.js
Added documentation files for ComfyApi, ComfyApp, LitegraphService, and MaskEditor, summarizing their main functions and usage. Refactored js/Canvas.js to improve mask processing logic, using viewport pan for cropping and applying mask color only to non-transparent pixels. Also made minor formatting and logging consistency improvements throughout Canvas.js.
2025-07-02 00:21:53 +02:00
Dariusz L
42e13f1551 Update pyproject.toml v1.3.0 2025-07-01 17:03:53 +02:00
Dariusz L
562b0db042 Initial commit
Project scaffolding and initial file setup.
2025-07-01 17:02:15 +02:00
Dariusz L
038dad759a Update bug_report.yml 2025-07-01 12:07:57 +02:00
Dariusz L
6f4602eb31 Update README.md 2025-07-01 12:03:13 +02:00
Dariusz L
cac7652b7d Create docs_request.yml 2025-06-30 14:30:11 +02:00
Dariusz L
d5573f426c Create bug_report.yml 2025-06-30 14:29:01 +02:00
Dariusz L
979fcd59bc Update ComfyUIdownloads.yml 2025-06-29 16:18:10 +02:00
Dariusz L
4ec470a3ed Add LayerForge test workflow example
Added a new example workflow for LayerForge, including a JSON workflow file and a corresponding PNG diagram. This provides a reference for users to understand and test LayerForge integration and node connections.
2025-06-29 16:03:10 +02:00
Dariusz L
8a456db6a0 Update README.md 2025-06-29 15:56:17 +02:00
Dariusz L
55a60d710c Update ComfyUIdownloads.yml 2025-06-29 15:51:42 +02:00
Dariusz L
e40c85b0ee Update ComfyUIdownloads.yml 2025-06-29 15:46:30 +02:00
Dariusz L
145d64ea39 Update ComfyUIdownloads.yml 2025-06-29 15:36:16 +02:00
Dariusz L
281350f75a Update ComfyUIdownloads.yml 2025-06-29 15:30:31 +02:00
Dariusz L
dc3197e914 Update ComfyUIdownloads.yml 2025-06-29 15:28:12 +02:00
Dariusz L
5a71eb46db Update release.yml 2025-06-29 15:20:15 +02:00
Dariusz L
35d3c77ba8 Update ComfyUIdownloads.yml 2025-06-29 15:15:11 +02:00
GitHub Action
813df556fb Create LayerForge badge 2025-06-29 12:41:37 +00:00
Dariusz L
6372aea90c Create ComfyUIdownloads.yml 2025-06-29 14:40:41 +02:00
Dariusz L
9ab8680a85 Update README.md 2025-06-29 04:57:31 +02:00
Dariusz L
90a0c6476f Update README.md 2025-06-29 04:51:48 +02:00
Dariusz L
3544576605 Revert "Add mask editor integration to canvas workflow"
This reverts commit 7a7c8f2295.
2025-06-29 04:49:56 +02:00
Dariusz L
3b16c00b66 Revert "Refactor Canvas class as facade and clean up CanvasLayers"
This reverts commit 9dcf38b36d.
2025-06-29 04:49:49 +02:00
Dariusz L
d0ade5ebc7 Revert "Update README.md"
This reverts commit fc8ebedb1e.
2025-06-29 04:45:45 +02:00
Dariusz L
9dcf38b36d Refactor Canvas class as facade and clean up CanvasLayers
Refactored the Canvas class to act as a facade, providing a simplified high-level interface and delegating detailed operations to internal modules. Added Polish documentation, grouped and clarified main operations, and moved legacy/delegation methods to the end for backward compatibility. Removed unused or redundant methods from CanvasLayers.js, such as removeLayer, moveLayer, addMattedLayer, isRotationHandle, getResizeHandle, handleBlendModeSelection, and getFlattenedCanvasAsDataURL, to streamline the codebase.
2025-06-29 04:41:48 +02:00
Dariusz L
7a7c8f2295 Add mask editor integration to canvas workflow
Introduces the ability to open the current canvas in a mask editor, upload and retrieve mask edits, and apply them to the mask layer. Adds utility functions for mask editor state detection and control, a new 'Edit Mask' button in the UI, and methods for handling mask updates and preview refresh. Also adds a setMask method to MaskTool for precise mask placement.
2025-06-29 04:15:45 +02:00
Dariusz L
fc8ebedb1e Update README.md 2025-06-29 00:47:53 +02:00
GitHub Action
98037324cd create clone count badge 2025-06-28 22:35:15 +00:00
Dariusz L
372a7a4718 Update clone.yml 2025-06-29 00:28:22 +02:00
Dariusz L
8a18e4ec30 Update clone.yml 2025-06-29 00:24:49 +02:00
Dariusz L
ade3cd7818 Add GitHub clone count badge workflow
Introduces a GitHub Actions workflow to update and display the repository's clone count using a dynamic badge. Updates README.md to include the clone count badge.
2025-06-29 00:22:15 +02:00