mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-06 16:10:09 +00:00
[BugFix] Fix incorrect selection overlay after drag (#2658)
This commit is contained in:
@@ -76,9 +76,17 @@ watch(
|
||||
watch(
|
||||
() => canvasStore.canvas?.state?.draggingItems,
|
||||
(draggingItems) => {
|
||||
visible.value = !draggingItems
|
||||
// Litegraph draggingItems state can end early before the bounding boxes of
|
||||
// the selected items are updated. Delay to make sure we put the overlay in
|
||||
// the correct position.
|
||||
// https://github.com/Comfy-Org/ComfyUI_frontend/issues/2656
|
||||
if (draggingItems === false) {
|
||||
positionSelectionOverlay(canvasStore.canvas as LGraphCanvas)
|
||||
setTimeout(() => {
|
||||
visible.value = true
|
||||
positionSelectionOverlay(canvasStore.canvas as LGraphCanvas)
|
||||
}, 100)
|
||||
} else {
|
||||
visible.value = false
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user