mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-13 09:00:16 +00:00
Update litegraph (Pan when dragging link) (#1056)
* Update litegraph (Pan when dragging link) * Update test expectations [skip ci] --------- Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
@@ -373,6 +373,26 @@ test.describe('Canvas Interaction', () => {
|
||||
expect(await getCursorStyle()).toBe('default')
|
||||
})
|
||||
|
||||
test('Can pan when dragging a link', async ({ comfyPage }) => {
|
||||
const posSlot1 = comfyPage.clipTextEncodeNode1InputSlot
|
||||
await comfyPage.page.mouse.move(posSlot1.x, posSlot1.y)
|
||||
await comfyPage.page.mouse.down()
|
||||
const posEmpty = comfyPage.emptySpace
|
||||
await comfyPage.page.mouse.move(posEmpty.x, posEmpty.y)
|
||||
await expect(comfyPage.canvas).toHaveScreenshot('dragging-link1.png')
|
||||
await comfyPage.page.keyboard.down('Space')
|
||||
await comfyPage.page.mouse.move(posEmpty.x + 100, posEmpty.y + 100)
|
||||
// Canvas should be panned.
|
||||
await expect(comfyPage.canvas).toHaveScreenshot(
|
||||
'panning-when-dragging-link.png'
|
||||
)
|
||||
await comfyPage.page.keyboard.up('Space')
|
||||
await comfyPage.page.mouse.move(posEmpty.x, posEmpty.y)
|
||||
// Should be back to dragging link mode when space is released.
|
||||
await expect(comfyPage.canvas).toHaveScreenshot('dragging-link2.png')
|
||||
await comfyPage.page.mouse.up()
|
||||
})
|
||||
|
||||
test('Can pan very far and back', async ({ comfyPage }) => {
|
||||
// intentionally slice the edge of where the clip text encode dom widgets are
|
||||
await comfyPage.pan({ x: -800, y: -300 }, { x: 1000, y: 10 })
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 100 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 97 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 96 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 93 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 92 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 90 KiB |
Reference in New Issue
Block a user