-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Make sure plot size is positive #4429
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
Changes from 4 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -742,7 +742,7 @@ impl Plot { | |
margin_fraction, | ||
width, | ||
height, | ||
min_size, | ||
mut min_size, | ||
data_aspect, | ||
view_aspect, | ||
mut show_x, | ||
|
@@ -768,6 +768,10 @@ impl Plot { | |
|
||
// Determine position of widget. | ||
let pos = ui.available_rect_before_wrap().min; | ||
// Minimum values for screen protection | ||
min_size.x = min_size.x.at_least(64.0); | ||
min_size.y = min_size.y.at_least(15.0); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we should do this. If the user wants a plot that is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
If it is greater than |
||
|
||
// Determine size of widget. | ||
let size = { | ||
let width = width | ||
|
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.
use
DragValue::clamp_range
instead