@@ -311,12 +311,12 @@ void Placement::placeSymbolBucket(const BucketPlacementData& params, std::set<ui
311311 const auto prevAnchor = prevOffset->second .anchor ;
312312 auto found = std::find (variableTextAnchors.begin (), variableTextAnchors.end (), prevAnchor);
313313 if (found != variableTextAnchors.begin () && found != variableTextAnchors.end ()) {
314- std::vector<style::TextVariableAnchorType> filtered;
315- filtered. reserve (variableTextAnchors. size ());
316- filtered. push_back (prevAnchor);
317- for ( auto anchor : variableTextAnchors ) {
318- if (anchor != prevAnchor) {
319- filtered. push_back (anchor);
314+ std::vector<style::TextVariableAnchorType> filtered{prevAnchor} ;
315+ if (! isTiltedView ()) {
316+ for ( auto anchor : variableTextAnchors) {
317+ if ( anchor != prevAnchor ) {
318+ filtered. push_back (anchor);
319+ }
320320 }
321321 }
322322 variableTextAnchors = std::move (filtered);
@@ -659,22 +659,24 @@ void Placement::placeSymbolBucket(const BucketPlacementData& params, std::set<ui
659659
660660 } else {
661661 auto sortedSymbols = bucket.getSymbols (params.sortKeyRange );
662- if (auto * previousPlacement = getPrevPlacement ()) {
663- std::stable_sort (
664- sortedSymbols.begin (), sortedSymbols.end (), [&](const SymbolInstance& a, const SymbolInstance& b) {
665- auto * aPlacement = previousPlacement->getSymbolPlacement (a);
666- auto * bPlacement = previousPlacement->getSymbolPlacement (b);
667- if (!aPlacement) {
668- // a < b, if 'a' is new and if 'b' was previously hidden.
669- return bPlacement && !bPlacement->placed ();
670- }
671- if (!bPlacement) {
672- // a < b, if 'b' is new and 'a' was previously shown.
673- return aPlacement && aPlacement->placed ();
674- }
675- // a < b, if 'a' was shown and 'b' was hidden.
676- return aPlacement->placed () && !bPlacement->placed ();
677- });
662+ auto * previousPlacement = getPrevPlacement ();
663+ if (previousPlacement && isTiltedView ()) {
664+ std::stable_sort (sortedSymbols.begin (),
665+ sortedSymbols.end (),
666+ [&previousPlacement](const SymbolInstance& a, const SymbolInstance& b) {
667+ auto * aPlacement = previousPlacement->getSymbolPlacement (a);
668+ auto * bPlacement = previousPlacement->getSymbolPlacement (b);
669+ if (!aPlacement) {
670+ // a < b, if 'a' is new and if 'b' was previously hidden.
671+ return bPlacement && !bPlacement->placed ();
672+ }
673+ if (!bPlacement) {
674+ // a < b, if 'b' is new and 'a' was previously shown.
675+ return aPlacement && aPlacement->placed ();
676+ }
677+ // a < b, if 'a' was shown and 'b' was hidden.
678+ return aPlacement->placed () && !bPlacement->placed ();
679+ });
678680 }
679681 for (const SymbolInstance& symbol : sortedSymbols) {
680682 placeSymbol (symbol);
@@ -1201,6 +1203,10 @@ void Placement::markUsedOrientation(SymbolBucket& bucket,
12011203 }
12021204}
12031205
1206+ bool Placement::isTiltedView () const {
1207+ return updateParameters->transformState .getPitch () != 0 .0f ;
1208+ }
1209+
12041210float Placement::symbolFadeChange (TimePoint now) const {
12051211 if (transitionsEnabled () &&
12061212 transitionOptions.duration .value_or (util::DEFAULT_TRANSITION_DURATION) > Milliseconds (0 )) {
0 commit comments