mirror of
https://github.com/Azornes/Comfyui-LayerForge.git
synced 2026-03-21 20:52:12 -03:00
Make batch preview menu draggable and position-aware
Added draggable functionality to the batch preview menu, allowing users to reposition it within the canvas using world coordinates. The menu's position now updates with viewport changes, and its initial placement is centered below the output area. Also refactored logic to show the menu with new layers instead of adding to an existing batch.
This commit is contained in:
@@ -493,8 +493,8 @@ export class Canvas {
|
||||
log.info('Auto-refresh triggered, importing latest images.');
|
||||
const newLayers = await this.canvasIO.importLatestImages(lastExecutionStartTime);
|
||||
|
||||
if (newLayers && newLayers.length > 0) {
|
||||
this.batchPreviewManager.addLayers(newLayers);
|
||||
if (newLayers && newLayers.length > 1) {
|
||||
this.batchPreviewManager.show(newLayers);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user