[core] don't hide icons if text is an empty string
This commit is contained in:
committed by
Ansis Brammanis
parent
c2d9d6a423
commit
ebb72b9002
@@ -95,9 +95,6 @@ void Placement::placeLayerBucket(
|
||||
auto partiallyEvaluatedTextSize = bucket.textSizeBinder->evaluateForZoom(state.getZoom());
|
||||
auto partiallyEvaluatedIconSize = bucket.iconSizeBinder->evaluateForZoom(state.getZoom());
|
||||
|
||||
const bool iconWithoutText = !bucket.hasTextData() || bucket.layout.get<style::TextOptional>();
|
||||
const bool textWithoutIcon = !bucket.hasIconData() || bucket.layout.get<style::IconOptional>();
|
||||
|
||||
for (auto& symbolInstance : bucket.symbolInstances) {
|
||||
|
||||
if (seenCrossTileIDs.count(symbolInstance.crossTileID) == 0) {
|
||||
@@ -140,6 +137,9 @@ void Placement::placeLayerBucket(
|
||||
offscreen &= placed.second;
|
||||
}
|
||||
|
||||
const bool iconWithoutText = !symbolInstance.hasText || bucket.layout.get<style::TextOptional>();
|
||||
const bool textWithoutIcon = !symbolInstance.hasIcon || bucket.layout.get<style::IconOptional>();
|
||||
|
||||
// combine placements for icon and text
|
||||
if (!iconWithoutText && !textWithoutIcon) {
|
||||
placeText = placeIcon = placeText && placeIcon;
|
||||
|
||||
Reference in New Issue
Block a user