Commit Graph

341 Commits

Author SHA1 Message Date
Dariusz L
1bd261bee0 Adjust Style disabled buttons 2025-08-04 01:00:35 +02:00
Dariusz L
df6979a59b Fix selection border points for vertical/horizontal flip 2025-08-04 00:46:14 +02:00
Dariusz L
2427f0bc5f Add fallback instructions to error for node confirmation failure 2025-08-03 23:08:52 +02:00
Dariusz L
3356c631bb Fix toggle mask switch UI sync with auto refresh
Ensured the toggle mask switch UI stays in sync with mask visibility when auto_refresh_after_generation hides or shows the mask. The checkbox and switch now correctly reflect the current mask state, preventing UI desynchronization and improving user experience.
2025-08-03 22:25:25 +02:00
Dariusz L
3d34bfafd5 Fix matting: refresh image after background removal
Fixed an issue where images were not immediately refreshed after background removal (matting). Now, the canvas updates instantly when the background is removed, ensuring correct display without requiring manual scaling or other actions.
2025-08-03 22:14:39 +02:00
Dariusz L
3c3e6934d7 Refactor CanvasLayers.ts: unify & deduplicate logic
Refactored CanvasLayers.ts to eliminate code duplication by unifying five main areas into reusable functions, following the DRY principle. Improved code readability, maintainability, and flexibility with better naming, documentation, and parameterization.
2025-08-03 21:57:47 +02:00
Dariusz L
84e1e4820c Improve cache selection for scaling with blend & crop
Enhanced the system to always select the best available cache based on both blend area and crop, prioritizing exact matches. Prevented costly operations and live rendering during scaling for optimal performance and smooth user experience.
2025-08-03 21:01:46 +02:00
Dariusz L
012368c52b Revert Cached Blend Area 2025-08-03 18:20:41 +02:00
Dariusz L
82c42f99fe Fix clipboard switch tooltip to update on toggle
Refactored tooltip logic for the clipboard switch so it now updates immediately when toggled, showing the correct template without requiring mouse movement. Added helper functions and improved event handling for better UX.
2025-08-03 14:56:18 +02:00
Dariusz L
5da0855a52 Added tooltip to mask visibility switch 2025-08-03 14:38:40 +02:00
Dariusz L
ed9fdf5d60 disable delete button when no layers selected
Added updateButtonStates() to enable/disable delete button based on selection
Updated control setup and selection handlers to call this method
Added CSS for disabled button state and tooltip
Delete button now disables when no layers are selected; all other panel features unchanged
2025-08-03 14:33:20 +02:00
Dariusz L
d84b9385ad Refactor: Move CanvasLayersPanel inline styles to external CSS
Moved all inline styles from CanvasLayersPanel.ts to layers_panel.css
Updated TypeScript to load external CSS and removed injectStyles()
Replaced inline styles with CSS classes in UI methods
Ensured all panel features and interactions work as before
Improved code maintainability and consistency with project structure
2025-08-03 14:27:31 +02:00
Dariusz L
c4318d4923 Refactor: Move blend mode menu styles to CSS file
Moved all blend mode menu styles from CanvasLayers.ts to a dedicated CSS file. Replaced inline styles with CSS classes and preserved all functionality.
2025-08-03 14:18:21 +02:00
Dariusz L
5b54ab28cb Update pyproject.toml v1.5.2 2025-08-03 02:45:20 +02:00
Dariusz L
503ec126a5 Fix DataCloneError by excluding non-serializable cache from state
Excluded blendedImageCache and blendedImageDirty properties from layer serialization in CanvasState.ts to prevent DataCloneError when saving state. This ensures that only serializable data is sent to Web Workers, while runtime caches are regenerated as needed. Blend area performance optimization remains functional without serialization issues.
2025-08-03 02:43:30 +02:00
Dariusz L
3d6e3901d0 Fix button crop icon display and update functionality 2025-08-03 02:19:52 +02:00
Dariusz L
4df89a793e Fix layer selection bug by sorting hit-test by z-index 2025-08-02 19:52:08 +02:00
Dariusz L
e42e08e35d Crop mode button to switch 2025-08-02 19:43:03 +02:00
Dariusz L
7ed6f7ee93 Implement crop mode for cropping selected layer 2025-08-02 19:05:11 +02:00
Dariusz L
9b0d4b3149 Update pyproject.toml v1.5.1 2025-08-01 15:56:25 +02:00
Dariusz L
f0f3d419f8 Update README.md 2025-08-01 15:51:38 +02:00
Dariusz L
26e2036388 Repair cnr_id 2025-08-01 15:23:18 +02:00
Dariusz L
22f5d028a2 Update README.md 2025-07-30 16:39:49 +02:00
Dariusz L
0b817411b7 Update pyproject.toml v1.5.0 2025-07-30 15:48:55 +02:00
Dariusz L
f755507974 Update README.md 2025-07-30 15:00:19 +02:00
Dariusz L
d65dc4349a Update README.md 2025-07-30 14:47:33 +02:00
Dariusz L
04033a48cb Update README.md 2025-07-30 14:44:28 +02:00
Dariusz L
05c0b91ecc Example_workflows 2025-07-30 14:41:05 +02:00
Dariusz L
4de1812370 Update config.js 2025-07-30 13:35:53 +02:00
Dariusz L
e3cef041c9 Implement robust world-based positioning for Blend Mode menu
Redesigned the positioning system for the Blend Mode menu, inspired by the "Custom Output Area" logic. The menu now anchors precisely to the top-right corner of the viewport and stays in place during panning and zooming.
2025-07-30 13:06:01 +02:00
Dariusz L
03950b1787 Implement adaptive selection frame based on layer coverage
Added a smart selection frame for layers that dynamically switches between solid and dashed lines depending on visibility:

Functionality:

Solid line: visible edge segments, not covered by other layers

Dashed line: covered edge segments, obscured by layers with higher zIndex and opacity > 0.1
2025-07-30 11:43:29 +02:00
Dariusz L
3d60c6aafa Move setOutputAreaSize 2025-07-30 11:37:26 +02:00
Dariusz L
fcb5565a28 Fix "Output Area Size" button behavior using new sizing method
Refactored the "Output Area Size" button to use the new setOutputAreaSize method:

Correctly sets output area size and position based on current system logic (custom shape, extensions, outputAreaBounds)

Fully functional across all editor modes

New resizing logic:

Operates relative to the current center of the output area

Output area expands or contracts around its center without repositioning

Ensures center remains unchanged as expected

This fix provides precise control over layout dimensions and aligns with user expectations across workflows.
2025-07-30 11:17:48 +02:00
Dariusz L
fb5bbdd187 Unify styling for "Run GC" and "Clear Cache" buttons
Updated the "Run GC" and "Clear Cache" buttons to match the styling of standard UI buttons
2025-07-30 11:10:13 +02:00
Dariusz L
7662a501a4 Add right-click deselection for layers
Implemented a new feature: right-clicking a layer in the layer panel now deselects it (if it was selected).
2025-07-30 11:06:37 +02:00
Dariusz L
fc4c343418 Improve minimized "Custom Output Area Active" styling
Unified the appearance of the minimized "Custom Output Area Active" bar with the full menu styling:
2025-07-30 11:05:04 +02:00
Dariusz L
b09f9789de Last Point yellow
Added a clear first point distinction when drawing a custom shape: if the mouse cursor is near the beginning of a line (the shape can be closed), the first point is drawn in yellow and larger. This allows the user to see when they can close the shape with a single click. The code has been compiled and is ready to use. The functionality works as expected.
2025-07-30 10:37:12 +02:00
Dariusz L
0de9aabb72 Hide pending generation areas 2025-07-30 09:52:07 +02:00
Dariusz L
3941104bd5 Tooltip Menu change to modern layout 2025-07-28 19:42:10 +02:00
Dariusz L
6b04e3891b Changed to switch button mask on/off 2025-07-28 19:02:29 +02:00
Dariusz L
257bada28d Nice Icon Comfy Clipspace
Nice Icon Comfy Clipspace
2025-07-28 17:54:50 +02:00
Dariusz L
7f39cfc8ed modernized the "Custom Shape Menu"
I updated src/css/custom_shape_menu.css with new styles for a modern look and feel, and I refactored src/CustomShapeMenu.ts to use a new HTML structure for the checkboxes that works with the updated CSS. The menu should now be fully functional with the new design.
2025-07-28 17:05:57 +02:00
Dariusz L
d2b7b396aa moved all CSS from src/CustomShapeMenu.ts to a new file
moved all CSS from src/CustomShapeMenu.ts to a new file src/css/custom_shape_menu.css and updated the TypeScript file to use the external stylesheet. This improves code organization and maintainability.
2025-07-28 16:43:59 +02:00
Dariusz L
0bae8c9c9d fixed the persistent shape preview bug
fixed the persistent shape preview bug where blue dashed lines would remain visible even when the user was no longer interacting with the slider. The issue was caused by race conditions and timing problems in the preview system.
2025-07-28 16:38:45 +02:00
Dariusz L
f57b9f6b58 Layout change 2025-07-28 15:57:28 +02:00
Dariusz L
bb687a768b Refactor text rendering and adjust viewport defaults
Introduced a drawTextWithBackground helper to centralize and simplify text rendering with backgrounds in CanvasRenderer (JS/TS). Updated all relevant usages to use this helper. Adjusted initial viewport x/y offsets in Canvas and Canvas.ts for improved default positioning.
2025-07-28 02:50:01 +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
7701ceda56 Center canvas viewport on fullscreen toggle
Adds logic to adjust the canvas viewport to keep content centered when entering or exiting fullscreen mode. The adjustment calculates the difference in container sizes and updates the viewport position accordingly, improving user experience during fullscreen transitions.
2025-07-27 22:51:37 +02:00
Dariusz L
9e4e618955 Add ESC key support to close fullscreen editor
Implemented an ESC key handler to allow users to close the fullscreen editor mode using the Escape key. Updated the editor button tooltip and the shortcuts documentation to reflect this new shortcut.
2025-07-27 21:39:18 +02:00