Skip to content
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

What exactly is the CommonMarkViewer::id used for? #55

Closed
emilk opened this issue Jun 25, 2024 · 1 comment · Fixed by #63
Closed

What exactly is the CommonMarkViewer::id used for? #55

emilk opened this issue Jun 25, 2024 · 1 comment · Fixed by #63

Comments

@emilk
Copy link
Contributor

emilk commented Jun 25, 2024

CommonMarkViewer::new takes a source_id: impl std::hash::Hash as an argument. I have some questions about it:

What exactly is it used for? Is it only used for the scroll cache of show_scrollable? If so, perhaps it could be moved from the constructor to show_scrollable to clarify this.

Should the Id be globally unique, or just unique within the parent Ui? That is: is it used directly, or mixed with ui.id() first?

@lampsitter
Copy link
Owner

lampsitter commented Jun 25, 2024

It's there primarily for egui::Grid. I think it was used for something related to images before the image update in egui too if I recall correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants