mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-07 08:30:06 +00:00
[nit] Simplify selection overlay watcher (#3789)
This commit is contained in:
@@ -63,19 +63,13 @@ watch(
|
||||
)
|
||||
|
||||
watch(
|
||||
() => {
|
||||
const canvas = canvasStore.canvas
|
||||
if (!canvas) return null
|
||||
return {
|
||||
scale: canvas.ds.state.scale,
|
||||
offset: [canvas.ds.state.offset[0], canvas.ds.state.offset[1]]
|
||||
}
|
||||
},
|
||||
() => canvasStore.getCanvas().ds.state,
|
||||
(state) => {
|
||||
if (!state) return
|
||||
|
||||
positionSelectionOverlay(canvasStore.canvas as LGraphCanvas)
|
||||
}
|
||||
positionSelectionOverlay(canvasStore.getCanvas())
|
||||
},
|
||||
{ deep: true }
|
||||
)
|
||||
|
||||
watch(
|
||||
|
||||
Reference in New Issue
Block a user