Commit Graph
59 Commits
Author SHA1 Message Date
Dariusz L c1ec26644d refactor: share mask result application 2026-08-13 08:20:35 +02:00
Dariusz L 38886f346d refactor: share image upload request construction 2026-08-13 08:12:08 +02:00
Dariusz L d68ee89f35 refactor: share preview blob loading 2026-08-13 08:09:04 +02:00
Dariusz L 459df09a70 refactor: unify canvas blob upload preparation 2026-08-13 08:06:43 +02:00
Dariusz L 64240a678e refactor: centralize Blob image loading 2026-08-13 07:33:29 +02:00
Dariusz L c461da1481 refactor: share distance-field mask rasterization 2026-08-13 05:43:15 +02:00
Dariusz L f60b7c0d8d refactor: centralize mask pixel primitives 2026-08-13 05:33:47 +02:00
Dariusz L 58ae68b8e1 refactor: centralize canvas blob variant dispatch 2026-08-13 05:24:43 +02:00
Dariusz L 76222a805b refactor: centralize strict canvas context creation 2026-08-13 04:44:59 +02:00
Dariusz L 082e8b74f1 refactor: share matting model status checks 2026-08-13 04:41:24 +02:00
Dariusz L b7785b6bc3 refactor: share mask result conversion 2026-08-13 04:32:30 +02:00
Dariusz L 4bed57afcd refactor: share mask pixel processing pipeline 2026-08-13 04:29:47 +02:00
Dariusz L 66faa3135a refactor: centralize image loading and serialization 2026-08-13 04:26:51 +02:00
Dariusz L 5f660629ec refactor: centralize layer geometry calculations 2026-08-13 04:18:43 +02:00
Dariusz L 2ab249efde refactor: share mask distance transform 2026-08-13 03:42:49 +02:00
Dariusz L 73d8e696cb refactor: share tensor to rgba conversion 2026-08-13 03:39:03 +02:00
Dariusz L 834476c259 refactor: unify canvas export actions 2026-08-13 03:29:52 +02:00
Dariusz L dc1bde6231 refactor: use canonical logging imports 2026-08-13 01:16:42 +02:00
Dariusz L 2cec014d4c feat: migrate Model Resolver logging system 2026-08-13 00:57:52 +02:00
Dariusz L f8137a57a7 refactor: add CONFIG and context menu support to notification toast system
- Add centralized CONFIG object with PROJECT_NAME, PROJECT_ICON, CSS_PREFIX,
  LOGGER_NAME, and SHARED_CONTAINER_ID to prevent hardcoded values
- Refactor showNotification to accept both legacy (backgroundColor, duration, type)
  and new (options object) signatures for backward compatibility
- Replace hardcoded CSS IDs and keyframe names with CONFIG-prefixed variants
- Change notification container layout from row-reverse to column for proper stacking
- Add context menu binding support via contextMenuModel and contextMenuTooltip options
- Extract SVG icons into dedicated iconSVGs record/object
- Fix wrapper functions (showSuccessNotification, showErrorNotification etc.) to
  pass type as first argument instead of undefined
- Increase container z-index to 100005 to appear above modal overlays
- Remove unused lf-progress and lf-progress-rewind keyframes
2026-06-30 01:39:23 +02:00
Dariusz L d0b7261671 Refactor notification progress to use requestAnimationFrame and fix db imports
- Replace CSS animation-based notification progress bar with requestAnimationFrame-driven animation
- Centralize getCanvasState/setCanvasState imports at top-level in CanvasView (remove dynamic import())
- Clean up animation frame lifecycle tracking to prevent orphaned rAF callbacks
- Set local debug log level in python/config.py for development diagnostics
2026-06-30 00:27:52 +02:00
Dariusz L 88c2249ded Rebuild JS artifacts (no functional changes)
Changes are auto-generated by TypeScript build (formatting/newlines only). No logic changes.
2026-05-01 20:46:28 +02:00
VladiCz 65f3dcc5d5 replace hardcoded ws protocol with wss protocol based on SSL 2026-04-25 10:41:28 +02:00
Dariusz L 5ea2562b32 added // @ts-ignore to compile to ts 2025-08-22 19:11:15 +02:00
Dariusz L d1ceb6291b feat: add base64 image paste
Implemented data URI (base64) support for paste operations.
2025-08-14 14:39:01 +02:00
Dariusz L 868221b285 feat: add notification system with deduplication
Implemented a comprehensive notification system with smart deduplication for LayerForge's "Paste Image" operations. The system prevents duplicate error/warning notifications while providing clear feedback for all clipboard operations including success, failure, and edge cases.
2025-08-14 14:30:51 +02:00
Dariusz L da37900b33 Refactor: unify image handling in CanvasIO via helpers
Removed duplicate code from CanvasIO.ts and replaced it with unified helpers from ImageUtils.ts. All tensor-to-image conversions and image creation now use centralized utility functions for consistency and maintainability.
2025-08-09 03:07:18 +02:00
Dariusz L 9f21ff13ae Add clipspace utils with full backward support
Refactored clipspace handling into ClipspaceUtils with validateAndFixClipspace() and safeClipspacePaste() for consistent, defensive logic. Ensures full backward compatibility with all ComfyUI versions and eliminates duplicated code.
2025-08-06 23:08:02 +02:00
Dariusz L 3d6e3901d0 Fix button crop icon display and update functionality 2025-08-03 02:19:52 +02:00
Dariusz L e42e08e35d Crop mode button to switch 2025-08-02 19:43:03 +02:00
Dariusz L 257bada28d Nice Icon Comfy Clipspace
Nice Icon Comfy Clipspace
2025-07-28 17:54:50 +02:00
Dariusz L f57b9f6b58 Layout change 2025-07-28 15:57:28 +02:00
Dariusz L 5e9869f827 Refactor notifications and improve matting UX
Refactored notification utilities for a more modern, reusable notification system and added info/success/error notifications to the background removal (matting) workflow. Removed the custom error dialog in favor of notifications, and exposed all notification types for debugging. Updated imports and cleaned up notification-related code.
2025-07-28 00:58:04 +02:00
Dariusz L bfea0cdbab Enhance notification system and auto-correct node_id
Adds a modern, type-based notification UI with support for success, error, info, warning, and alert styles, including a new showAlertNotification function. CanvasState now auto-corrects the node_id widget before saving state and notifies the user if a correction occurs. CanvasView centering logic now uses the actual canvas container for more accurate viewport adjustments.
2025-07-28 00:28:15 +02:00
Dariusz L 058a1c4d67 Standart Error in Utils 2025-07-27 20:30:06 +02:00
Dariusz L 207bacc1f8 Refactor image and mask utility functions
Moved convertToImage, createMaskFromImageSrc, and canvasToMaskImage from MaskProcessingUtils and mask_utils to ImageUtils for better modularity and reuse. Updated imports in dependent modules to use the new locations. Removed duplicate implementations from mask_utils and MaskProcessingUtils.
2025-07-27 18:47:41 +02:00
Dariusz L 9d0c946e22 Refactor canvas creation to use createCanvas utility
Replaces direct usage of document.createElement('canvas') and manual context setup with the createCanvas utility across multiple utility modules. This change improves code consistency, reduces duplication, and centralizes canvas/context creation logic. Also updates notification usage in ClipboardManager to use showNotification and showInfoNotification utilities.
2025-07-27 18:34:46 +02:00
Dariusz L 7e71d3ec3e Refactor image, mask, and notification logic into utils
Extracted image upload, mask processing, notification, and preview update logic into dedicated utility modules. Updated MaskEditorIntegration and SAMDetectorIntegration to use these new utilities, reducing code duplication and improving maintainability.
2025-07-27 18:19:35 +02:00
Dariusz L 764e802311 Add blend area effect for layers with distance field mask
Introduces a 'blendArea' property to layers and UI controls for adjusting it. Implements distance field mask generation in ImageAnalysis.ts and applies the mask during layer rendering for smooth edge blending. Refactors CanvasRenderer to delegate layer drawing to CanvasLayers for proper blend area support.
2025-07-24 23:34:27 +02:00
Dariusz L 3b1a69041c Add layer visibility toggle and icon support
Introduces a 'visible' property to layers and updates all relevant logic to support toggling layer visibility. Adds visibility toggle icons to the layers panel using a new IconLoader utility, with SVG and fallback canvas icons. Updates rendering, selection, and batch preview logic to respect layer visibility. Also improves blend mode menu UI and ensures new/pasted layers are always added on top with correct z-index.
2025-07-24 19:10:17 +02:00
Dariusz L 57bd1e1499 Add layer flipH/flipV properties and rendering support
Refactors horizontal and vertical mirroring to toggle flipH/flipV properties on layers instead of modifying image data. Updates rendering logic in CanvasLayers and CanvasRenderer to apply horizontal/vertical flipping via canvas transforms. Adds flipH and flipV to Layer type and includes them in state signature calculation.
2025-07-21 22:35:18 +02:00
Dariusz L 5adc77471f project migration to typescript
Project migration to typescript
2025-07-04 04:22:51 +02:00
Dariusz L 3e4cdf10bc Refactor CanvasView: externalize styles and tooltips
Moved inline CSS from CanvasView.js to a dedicated canvas_view.css file and added dynamic stylesheet loading. Extracted tooltip and shortcut HTML into separate template files and implemented a ResourceManager utility for loading stylesheets and templates. Updated CanvasInteractions.js and CanvasView.js to use the new resource management and template loading approach, improving maintainability and modularity.
2025-07-03 17:27:00 +02:00
Dariusz L aa31a347d1 Add configurable log level for Python and JS modules
Introduced LOG_LEVEL configuration in both Python and JavaScript to control logging verbosity. Updated logger initialization in canvas_node.py and LoggerUtils.js to use the new LOG_LEVEL from config files.
2025-07-03 13:15:33 +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.
2025-07-02 11:18:47 +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 562b0db042 Initial commit
Project scaffolding and initial file setup.
2025-07-01 17:02:15 +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 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 2033ab168a Set default log level to NONE and remove logger docs
Changed the default log level for both Python and JavaScript module loggers from DEBUG to NONE to disable logging by default. Removed the README_LOGGER.md documentation file, and updated README.md to remove a reference to seamless integration.
2025-06-28 08:38:08 +02:00