diff --git a/terrainrenderer.go b/terrainrenderer.go index 9d7be29..c48cb43 100644 --- a/terrainrenderer.go +++ b/terrainrenderer.go @@ -85,9 +85,9 @@ func (r *terrainRenderer) Handle(ctx ui.Context, event ui.Event) bool { r.project.update(ctx.Renderer()) } if r.hover != nil { - if e.Y < 0 { + if e.MouseWheel < 0 { r.project.ZoomOut(ctx, r.hover.ToF32()) - } else { + } else if e.MouseWheel > 0 { r.project.ZoomIn(ctx, r.hover.ToF32()) } }