Skip to content

Commit 6d22562

Browse files
DrJKLgithub-actions
andauthored
Polish: Make the clickable area for the slots more forgiving (#7084)
## Summary Makes the area a bit to the left and right of the dot also clickable. Addresses complaints about it being tricky to connect nodes in Nodes 2.0. --------- Co-authored-by: github-actions <[email protected]>
1 parent 04158de commit 6d22562

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ async function connectSlots(
9494
const fromLoc = slotLocator(page, from.nodeId, from.index, false)
9595
const toLoc = slotLocator(page, to.nodeId, to.index, true)
9696
await expectVisibleAll(fromLoc, toLoc)
97-
await fromLoc.dragTo(toLoc)
97+
await fromLoc.dragTo(toLoc, { force: true })
9898
await nextFrame()
9999
}
100100

@@ -183,7 +183,7 @@ test.describe('Vue Node Link Interaction', () => {
183183
const inputSlot = slotLocator(comfyPage.page, clipNode.id, 0, true)
184184
await expectVisibleAll(outputSlot, inputSlot)
185185

186-
await outputSlot.dragTo(inputSlot)
186+
await outputSlot.dragTo(inputSlot, { force: true })
187187
await comfyPage.nextFrame()
188188

189189
expect(await samplerOutput.getLinkCount()).toBe(0)
@@ -210,7 +210,7 @@ test.describe('Vue Node Link Interaction', () => {
210210
const inputSlot = slotLocator(comfyPage.page, samplerNode.id, 3, true)
211211
await expectVisibleAll(outputSlot, inputSlot)
212212

213-
await outputSlot.dragTo(inputSlot)
213+
await outputSlot.dragTo(inputSlot, { force: true })
214214
await comfyPage.nextFrame()
215215

216216
expect(await samplerOutput.getLinkCount()).toBe(0)
501 Bytes
Loading

src/renderer/extensions/vueNodes/components/SlotConnectionDot.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ defineExpose({
2020
<template>
2121
<div
2222
:class="
23-
cn('size-6 flex items-center justify-center group/slot', props.class)
23+
cn(
24+
'after:absolute after:inset-y-0 after:w-5/2 relative size-6 flex items-center justify-center group/slot',
25+
props.class
26+
)
2427
"
2528
>
2629
<div

0 commit comments

Comments
 (0)