Skip to content

Commit

Permalink
Merge pull request #197 from kieler/nre/titleScalingIfStrictlySmaller
Browse files Browse the repository at this point in the history
Only scale up titles if scaling is *strictly* larger than 1
  • Loading branch information
NiklasRentzCAU authored Oct 16, 2024
2 parents 2a41812 + 291a3ef commit f68d517
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/klighd-core/src/views-rendering.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1373,7 +1373,7 @@ export function renderKRendering(
}
if (
(((providingRegion && providingRegion.detail !== DetailLevel.FullDetails && parent.children.length > 1) ||
context.viewport.zoom <= titleScalingFactorOption) &&
context.viewport.zoom < titleScalingFactorOption) &&
!isProxy) ||
scaleProxy
) {
Expand Down Expand Up @@ -1478,7 +1478,7 @@ export function renderKRendering(
(kRendering.properties['klighd.isNodeTitle'] as boolean) &&
(((!providingRegion || providingRegion.detail === DetailLevel.FullDetails) && !isProxy) ||
scaleProxy) &&
((context.viewport.zoom <= titleScalingFactorOption && !isProxy) || scaleProxy) &&
((context.viewport.zoom < titleScalingFactorOption && !isProxy) || scaleProxy) &&
// Don't draw if the rendering is an empty KText
(kRendering.type !== K_TEXT || (kRendering as KText).text !== '')
) {
Expand Down

0 comments on commit f68d517

Please sign in to comment.