aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ui/graph.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ui/graph.rs b/src/ui/graph.rs
index 14f0c7d..d02b587 100644
--- a/src/ui/graph.rs
+++ b/src/ui/graph.rs
@@ -80,8 +80,8 @@ pub struct GraphState {
impl GraphState {
fn view_rectangle(&self, frame: &Frame, step: usize) -> Rectangle {
let s = Size::new(
- self.map_to_step(frame.width() / self.scale + 2.0 * step as f32, step),
- self.map_to_step(frame.height() / self.scale + 2.0 * step as f32, step),
+ self.map_to_step((frame.width() / self.scale) * step as f32 + 10.0, step),
+ self.map_to_step((frame.height() / self.scale) * step as f32 + 10.0, step),
);
let p = Point::new(
self.map_to_step(-self.center.x / self.scale - s.width / 2.0, step),