diff --git a/vtm-gdx/src/org/oscim/gdx/InputHandler.java b/vtm-gdx/src/org/oscim/gdx/InputHandler.java index 249eac7f9..ef9802f3f 100644 --- a/vtm-gdx/src/org/oscim/gdx/InputHandler.java +++ b/vtm-gdx/src/org/oscim/gdx/InputHandler.java @@ -218,7 +218,6 @@ public boolean touchDragged(int screenX, int screenY, int pointer) { @Override public boolean mouseMoved(int screenX, int screenY) { - mPosX = screenX; mPosY = screenY; return false; @@ -226,18 +225,10 @@ public boolean mouseMoved(int screenX, int screenY) { @Override public boolean scrolled(int amount) { - - if (amount > 0) { - - mMap.animator().animateZoom(250, 0.75f, 0, 0); - } else { - float fx = mPosX - mMap.getWidth() / 2; - float fy = mPosY - mMap.getHeight() / 2; - - mMap.animator().animateZoom(250, 1.333f, fx, fy); - } + float fx = mPosX - mMap.getWidth() / 2; + float fy = mPosY - mMap.getHeight() / 2; + mMap.animator().animateZoom(250, amount > 0 ? 0.75f : 1.333f, fx, fy); mMap.updateMap(false); - return true; } }