Browse Source

style(component): shrink word cloud font scale

main
Mohan 1 month ago
parent
commit
ca783bcfdc
  1. 6
      src/components/TagCloud.vue

6
src/components/TagCloud.vue

@ -10,8 +10,8 @@ const loading = ref(false)
const error = ref<string | null>(null)
const WIDTH = 260
const MIN_FONT = 13
const MAX_FONT = 30
const MIN_FONT = 11
const MAX_FONT = 22
interface PlacedTag {
tag: Tag
@ -25,7 +25,7 @@ const placedTags = ref<PlacedTag[]>([])
const viewBox = ref('0 0 260 40')
function fontScale(count: number, max: number): number {
if (max <= 1) return 20
if (max <= 1) return 16
return MIN_FONT + (count / max) * (MAX_FONT - MIN_FONT)
}

Loading…
Cancel
Save