From a109838c4c569227481845a0ab95bd3c9f03b272 Mon Sep 17 00:00:00 2001 From: Thomas von Dein Date: Sat, 8 Jun 2024 16:29:09 +0200 Subject: [PATCH] calculating zoom factor based on cellsize --- src/config.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config.go b/src/config.go index cc9427b..ce2db9c 100644 --- a/src/config.go +++ b/src/config.go @@ -50,7 +50,7 @@ const ( DEFAULT_GRID_WIDTH = 600 DEFAULT_GRID_HEIGHT = 400 DEFAULT_CELLSIZE = 4 - DEFAULT_ZOOMFACTOR = 150 + DEFAULT_ZOOMFACTOR = 400 DEFAULT_GEOM = "640x384" DEFAULT_THEME = "standard" // "light" // inverse => "dark" ) @@ -75,7 +75,7 @@ const KEYBINDINGS string = ` ` func (config *Config) SetupCamera() { - config.Zoomfactor = DEFAULT_ZOOMFACTOR + config.Zoomfactor = DEFAULT_ZOOMFACTOR / config.Cellsize // calculate the initial cam pos. It is negative if the total grid // size is smaller than the screen in a centered position, but @@ -129,7 +129,7 @@ func (config *Config) ParseGeom(geom string) error { config.ScreenWidth = width config.ScreenHeight = height - config.Cellsize = DEFAULT_CELLSIZE + //config.Cellsize = DEFAULT_CELLSIZE return nil }