mouseover make the plot to zoom in improperly
还没有人认领这个 Issue。
- #144 来自 @bombless —— 已关闭,未合并
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 42/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- rust
调研方向
先运行链接的 egui_plot-mousover-test 复现程序或 Rust 代码示例。然后,围绕 plot 文本示例跟踪 egui_plot 的鼠标交互和缩放处理;完成的标准是,将鼠标移到 plot 上不再改变其视觉边界或缩放级别。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
A simple egui_plot app will zoom in improperly when you move your mouse
To Reproduce
Steps to reproduce the behavior:
git-checkout the repo
or just use the code below
use eframe::egui;
use egui_plot::{Plot, PlotPoint, Text as PlotText};
fn main() {
let app = App;
let native_options = eframe::NativeOptions {
viewport: egui::ViewportBuilder::default()
.with_inner_size([1280.0, 800.0])
.with_title("mouseover test"),
..Default::default()
};
eframe::run_native("test", native_options, Box::new(|_cc| Ok(Box::new(app)))).unwrap();
}
struct App;
impl eframe::App for App {
fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {
egui::CentralPanel::default().show(ctx, |ui| {
let plot = Plot::new("test")
.allow_scroll(true)
.allow_zoom(true)
.allow_boxed_zoom(true)
.allow_drag(true)
.include_x(0.0)
.include_x(0.1);
plot.show(ui, |plot_ui| {
let bounds = plot_ui.plot_bounds();
let val = bounds.min()[0];
plot_ui.text(PlotText::new(
"",
PlotPoint { x: val, y: 0.0 },
val.to_string(),
));
});
});
}
}
Expected behavior
Moving your mouse won't make the plot zoom in, it should remain the same visual appearance without changing.
Screenshots
https://github.com/user-attachments/assets/9862035e-feb4-4e1d-81ee-f56cac4dc22e
Additional context
None.
- 主要语言
- Rust
- 星标
- 494
- 派生
- 110
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
emilk/egui_plot 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 85/100
-
bug
难度 1/5 1 小时以内 新手友好度 90/100
-
难度 3/5 1-2 天 新手友好度 66/100
-
难度 4/5 3-5 天 新手友好度 48/100
-
难度 4/5 3-5 天 新手友好度 45/100
相似的 Issue
-
claim
难度 2/5 1-3 小时 新手友好度 88/100
Nixitov/Riptide-Native#946 ·
维护者通常 1 天内回复
-
area: ai-assistants documentation help wanted
难度 2/5 1-3 小时 新手友好度 78/100
BetaBots-LLC/latticegate#17 ·
-
难度 1/5 1 小时以内 新手友好度 94/100
storytold/craft-libs#5594 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
LingyunStudio/RustMusic#16 ·