-
Couldn't load subscription status.
- Fork 392
allow copy and paste when using minimap or canvas menu (bottom right) #6055
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| import type { Locator, Page } from '@playwright/test' | ||
|
|
||
| export class Minimap { | ||
| constructor(public readonly page: Page) {} | ||
|
|
||
| get mainContainer(): Locator { | ||
| return this.page.locator('.minimap-main-container') | ||
| } | ||
|
|
||
| get container(): Locator { | ||
| return this.page.locator('.litegraph-minimap') | ||
| } | ||
|
|
||
| get canvas(): Locator { | ||
| return this.container.locator('.minimap-canvas') | ||
| } | ||
|
|
||
| get viewport(): Locator { | ||
| return this.container.locator('.minimap-viewport') | ||
| } | ||
|
|
||
| get settingsButton(): Locator { | ||
| return this.container.getByRole('button').first() | ||
| } | ||
|
|
||
| get closeButton(): Locator { | ||
| return this.container.getByTestId('close-minmap-button') | ||
| } | ||
|
|
||
| async clickCanvas(options?: Parameters<Locator['click']>[0]): Promise<void> { | ||
| await this.canvas.click(options) | ||
| } | ||
|
|
||
| async clickSettingsButton(): Promise<void> { | ||
| await this.settingsButton.click() | ||
| } | ||
|
|
||
| async close(): Promise<void> { | ||
| await this.closeButton.click() | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| /** | ||
| * Utility functions for handling workbench events | ||
| */ | ||
|
|
||
| /** | ||
| * Checks if an event target is within the graph canvas or related UI elements | ||
| * (minimap, canvas controls, etc.) | ||
| * | ||
| * Used by clipboard handlers to determine if copy/paste events should be | ||
| * intercepted for graph operations vs. allowing default browser behavior | ||
| * for text inputs and other UI elements. | ||
| * | ||
| * @param target - The event target to check | ||
| * @returns true if the target is within graph-related UI elements | ||
| */ | ||
| export function isEventTargetInGraph(target: EventTarget | null): boolean { | ||
| if (!(target instanceof Element)) { | ||
| return false | ||
| } | ||
|
|
||
| return ( | ||
| target.id === 'graph-canvas' || | ||
| target.id === 'comfy-minimap' || | ||
| target.id === 'graph-canvas-controls' || | ||
| target.classList.contains('graph-canvas-container') || | ||
| target.classList.contains('litegraph') || | ||
| target.closest('#comfy-minimap') !== null || | ||
| target.closest('#graph-canvas-controls') !== null || | ||
| target.closest('#graph-canvas-container') !== null | ||
| ) | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.