Merge pull request #7944 from ahocevar/point-wrap

Make wrap work with points in the vector-labels example
This commit is contained in:
Andreas Hocevar
2018-03-07 12:23:15 +01:00
committed by GitHub

View File

@@ -78,7 +78,7 @@ const getText = function(feature, resolution, dom) {
text = '';
} else if (type == 'shorten') {
text = text.trunc(12);
} else if (type == 'wrap' && dom.placement.value != 'line') {
} else if (type == 'wrap' && (!dom.placement || dom.placement.value != 'line')) {
text = stringDivider(text, 16, '\n');
}