Merge branch 'master' of https://github.com/mapbox/llmr-native
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user