-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Plot::Items::default_visible
allow hidden on init
#2557
Conversation
Plot::Items::visible
allow hidden on init
let hiddened= !(checked && visible || !checked && !visible); | ||
|
||
if hiddened { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let hiddened= !(checked && visible || !checked && !visible); | |
if hiddened { | |
if checked != visible { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…though I struggle to follow he logic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another possible logic without default_visible but with visible checking if it's in hidden_items.
(requires a PR to access hidden items, which seems necessary to know if the item is hidden in a future case.
and surely a specific logic for the visible.)
let visibility_points = !hidden_items.contains("Points");
plot_ui.points(points.name("Points").visible(visibility_points);
although with default_visible we set a state from the start, we don't have access to its modified state.
while with visible it will allow to have its state hidden or not dynamically.
I don't think they are the same thing all the same.
with default_visible we define a state from the start which is clear to me.
When to know if it is in hidden_items it is another problem.
I think I have a preference for default_visible to solve this feature.
But maybe an alternative and necessary PR to compare.
Plot::Items::visible
allow hidden on initPlot::Items::default_visible
allow hidden on init
This will hopefully speed up its development by having more reviewers and maintainers. Please re-open this PR at https://github.com/emilk/egui_plot/pulls See also: |
added feature described in this issue #2395