Commit 0bb1940
committed
refactor: delete useVueNodeLifecycle
What was left after node registration moved to `LGraph.add` was two calls on
two transitions, wrapped in a shared composable with one consumer.
- The `clearAllSlotLayouts` watch was redundant entering Vue mode, since
`clearViewGeometry` already drops slot layouts along with link and reroute
geometry. It was only doing work on the way out, so dispose clears instead
and the watch goes. This widens what mode-leave clears; legacy mode reads
none of it and re-entry clears again.
- `isInitialized` guarded nothing: `startSync` opens with `stopSync()`, and
`clearViewGeometry` is idempotent.
- `createSharedComposable` held no shared state once that flag was gone, and
`GraphCanvas.vue` was the only caller.
- The `arrange()` pass is legacy-canvas preparation, not Vue node lifecycle —
it computes slot positions before `drawConnections` can run without them. It
moves to `arrangeForLegacyRender` next to the other litegraph canvas
adapters, rather than becoming another method on LGraph.
The transitions were already driven from `GraphCanvas.vue`, which watches
`currentGraph` and `isInSubgraph`, so the remainder lands where it was being
called from.1 parent 626193a commit 0bb1940
3 files changed
Lines changed: 64 additions & 103 deletions
File tree
- src
- components/graph
- composables/graph
- renderer/core/canvas/litegraph
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
157 | 156 | | |
158 | 157 | | |
159 | 158 | | |
| |||
173 | 172 | | |
174 | 173 | | |
175 | 174 | | |
| 175 | + | |
176 | 176 | | |
| 177 | + | |
177 | 178 | | |
178 | 179 | | |
179 | 180 | | |
| |||
253 | 254 | | |
254 | 255 | | |
255 | 256 | | |
256 | | - | |
257 | | - | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
258 | 273 | | |
259 | 274 | | |
260 | 275 | | |
| |||
267 | 282 | | |
268 | 283 | | |
269 | 284 | | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
275 | 290 | | |
276 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
277 | 311 | | |
278 | 312 | | |
279 | 313 | | |
| |||
585 | 619 | | |
586 | 620 | | |
587 | 621 | | |
588 | | - | |
| 622 | + | |
589 | 623 | | |
590 | 624 | | |
591 | 625 | | |
| |||
This file was deleted.
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
0 commit comments