diff --git a/common/glfw_view.cpp b/common/glfw_view.cpp index e03b5ed2f..dcfaf6591 100644 --- a/common/glfw_view.cpp +++ b/common/glfw_view.cpp @@ -134,7 +134,11 @@ void GLFWView::mouseclick(GLFWwindow *window, int button, int action, int modifi view->map->stopPanning(); double now = glfwGetTime(); if (now - view->last_click < 0.4 /* ms */) { - view->map->scaleBy(2.0, view->last_x, view->last_y, 0.5); + if (modifiers & GLFW_MOD_SHIFT) { + view->map->scaleBy(0.5, view->last_x, view->last_y, 0.5); + } else { + view->map->scaleBy(2.0, view->last_x, view->last_y, 0.5); + } } view->last_click = now; } diff --git a/src/renderer/painter_text.cpp b/src/renderer/painter_text.cpp index e58de29b2..f2e458d8c 100644 --- a/src/renderer/painter_text.cpp +++ b/src/renderer/painter_text.cpp @@ -79,7 +79,6 @@ void Painter::renderText(TextBucket& bucket, const std::string& layer_name, cons // Calculate the speed of zooming, and how far it would zoom in terms of zoom levels in one duration float zoomDiff = endingZ - history[1].z, timeDiff = lastFrame.timestamp - history[1].timestamp; - if (timeDiff > duration) timeDiff = 1; float fadedist = zoomDiff / (timeDiff / duration); if (isnan(fadedist)) fprintf(stderr, "fadedist should never be NaN\n"); @@ -91,7 +90,7 @@ void Painter::renderText(TextBucket& bucket, const std::string& layer_name, cons textShader->setFadeDist(fadedist * 10); textShader->setMinFadeZoom(std::floor(lowZ * 10)); textShader->setMaxFadeZoom(std::floor(highZ * 10)); - textShader->setFadeZoom((map.getState().getZoom() + bump) * 10); + textShader->setFadeZoom((map.getState().getNormalizedZoom() + bump) * 10); // We're drawing in the translucent pass which is bottom-to-top, so we need // to draw the halo first.