Skip to content

Commit c01e920

Browse files
committed
Improvement - VueUiWordCloud - Cap maxFontSize to 100
1 parent abed59c commit c01e920

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,4 @@
110110
"vitest": "^3.1.1",
111111
"vue": "^3.5.14"
112112
}
113-
}
113+
}

src/wordcloud.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export function positionWords({
166166
const maskH = Math.round(height);
167167
const minFontSize = 1;
168168
const configMinFontSize = svg.minFontSize;
169-
const maxFontSize = svg.maxFontSize;
169+
const maxFontSize = Math.min(svg.maxFontSize, 100);
170170
const values = words.map(w => w.value);
171171
const minValue = Math.min(...values);
172172
const maxValue = Math.max(...values);

0 commit comments

Comments
 (0)