mirror of
https://github.com/Azornes/Comfyui-LayerForge.git
synced 2026-03-21 20:52:12 -03:00
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.
This commit is contained in:
@@ -179,8 +179,6 @@ export class BatchPreviewManager {
|
||||
this.layers.forEach((layer) => {
|
||||
layer.visible = true;
|
||||
});
|
||||
// Clear selection - deselect all layers
|
||||
this.canvas.updateSelection([]);
|
||||
// Update the layers panel to reflect visibility changes
|
||||
if (this.canvas.canvasLayersPanel) {
|
||||
this.canvas.canvasLayersPanel.onLayersChanged();
|
||||
@@ -229,7 +227,11 @@ export class BatchPreviewManager {
|
||||
});
|
||||
// Show only the current layer
|
||||
layer.visible = true;
|
||||
this.canvas.updateSelection([layer]);
|
||||
// Deselect only this layer if it is selected
|
||||
const selected = this.canvas.canvasSelection.selectedLayers;
|
||||
if (selected && selected.includes(layer)) {
|
||||
this.canvas.updateSelection(selected.filter((l) => l !== layer));
|
||||
}
|
||||
// Update the layers panel to reflect visibility changes
|
||||
if (this.canvas.canvasLayersPanel) {
|
||||
this.canvas.canvasLayersPanel.onLayersChanged();
|
||||
|
||||
Reference in New Issue
Block a user