-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
bugSomething is brokenSomething is broken
Description
Describe the bug
In the web demo, when the plot in the Context Menus demo has negative width or height, the app crashes due to invalid arguments for f64::clamp.
To Reproduce
Steps to reproduce the behavior:
- Open the Context Menus demo
- Set the width or height of the plot to a negative number by either dragging or manually inputting
- The app panics with
panicked at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/num/f64.rs:1496:9: min > max, or either was NaN. min = 440.00000059604645, max = -440.00000059604645
Expected behavior
The width or height should be set to 0.
Desktop:
- OS: Windows
- Browser: Google Chrome
- Version 124.0.6367.91 (Official Build) (64-bit)
rustbasic
Metadata
Metadata
Assignees
Labels
bugSomething is brokenSomething is broken