Fixed handling of mouse wheel for zooming the terrain.

This commit is contained in:
Sander Schobers 2020-05-18 11:39:27 +02:00
parent f6a58c4878
commit b85f4e404d

View File

@ -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())
}
}