summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnsis Brammanis <brammanis@gmail.com>2015-04-24 14:39:04 -0700
committerAnsis Brammanis <brammanis@gmail.com>2015-04-24 15:41:13 -0700
commit8aa2e2fef76eb4dfdb6e5b28a815babd27647322 (patch)
treef0f43e96aa45ee600b266da2fb07d6114c9d50d7
parent65306490dd074a268d4041a98302f54eaf82242f (diff)
downloadqtlocation-mapboxgl-8aa2e2fef76eb4dfdb6e5b28a815babd27647322.tar.gz
Don't wrap line labels.
fixes #1332 https://github.com/mapbox/mapbox-gl-js/blob/98af02492183975f1f17e089a7a4118ac1ec6ddf/js/data/symbol_bucket.js#L74
-rw-r--r--src/mbgl/renderer/symbol_bucket.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mbgl/renderer/symbol_bucket.cpp b/src/mbgl/renderer/symbol_bucket.cpp
index 517c8835c6..4563cf647c 100644
--- a/src/mbgl/renderer/symbol_bucket.cpp
+++ b/src/mbgl/renderer/symbol_bucket.cpp
@@ -183,7 +183,8 @@ void SymbolBucket::addFeatures(const GeometryTileLayer& layer,
if (feature.label.length()) {
shaping = fontStack->getShaping(
/* string */ feature.label,
- /* maxWidth: ems */ layout.text.max_width * 24,
+ /* maxWidth: ems */ layout.placement != PlacementType::Line ?
+ layout.text.max_width * 24 : 0,
/* lineHeight: ems */ layout.text.line_height * 24,
/* horizontalAlign */ horizontalAlign,
/* verticalAlign */ verticalAlign,