From 5d3f5478cd7e67a6ea8d207ff5929ad91a8a5195 Mon Sep 17 00:00:00 2001 From: alemidev Date: Mon, 13 Jun 2022 03:00:12 +0200 Subject: [PATCH] feat: remove left padding when limiting points --- src/app/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app/mod.rs b/src/app/mod.rs index 3bd7803..368d0aa 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -299,6 +299,11 @@ impl eframe::App for App { if panel.view_scroll { p = p .include_x(Utc::now().timestamp() as f64); + if panel.limit { + p = p + .set_margin_fraction(eframe::emath::Vec2{x:0.0, y:0.1}) + .include_x((Utc::now().timestamp() + ( panel.view_size as i64 * 3)) as f64); + } if panel.limit { p = p.include_x( (Utc::now().timestamp() - (panel.view_size as i64 * 60))