From 0c2ffc251c519af76a0ed6dd1925621ebe393e7b Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Thu, 22 Jan 2015 14:05:49 -0800 Subject: [PATCH] Revert "scale dashes by line-gap-width if present" This reverts commit 4791bac6753e16ef910a47c514e48b355e20295f. --- src/mbgl/style/style_layer.cpp | 12 ++---------- src/mbgl/style/style_properties.hpp | 2 +- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/mbgl/style/style_layer.cpp b/src/mbgl/style/style_layer.cpp index e3bff6ede..262ca23af 100644 --- a/src/mbgl/style/style_layer.cpp +++ b/src/mbgl/style/style_layer.cpp @@ -183,16 +183,8 @@ void StyleLayer::applyStyleProperties(const float z, const times applyStyleProperty(PropertyKey::LineDashArray, line.dash_array, z, now); applyStyleProperty(PropertyKey::LineImage, line.image, z, now); - // scale dash width by line-gap-width if present - applyStyleProperty(PropertyKey::LineGapWidth, line.dash_line_width, std::floor(z), now + 10000); - if (line.dash_line_width <= 0) { - // otherwise scale by line-width - applyStyleProperty(PropertyKey::LineWidth, line.dash_line_width, std::floor(z), now + 10000); - if (line.dash_line_width <= 0) { - // otherwise scale by default line-width value - line.dash_line_width = line.width; - } - } + // for scaling dasharrays + applyStyleProperty(PropertyKey::LineWidth, line.dash_line_width, std::floor(z), now + 10000); } template <> diff --git a/src/mbgl/style/style_properties.hpp b/src/mbgl/style/style_properties.hpp index fe6a2c250..c5149b2d1 100644 --- a/src/mbgl/style/style_properties.hpp +++ b/src/mbgl/style/style_properties.hpp @@ -38,7 +38,7 @@ struct LineProperties { float gap_width = 0; float blur = 0; std::vector dash_array; - float dash_line_width = 0; + float dash_line_width = 1; std::string image; inline bool isVisible() const {