Skip to content

Commit 79bab75

Browse files
committed
Add switch to force small legend/params text
1 parent fc4cef0 commit 79bab75

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

paint.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3595,15 +3595,16 @@ function drawImageParameters() {
35953595
drawImageParametersOnContext(dContext);
35963596
}
35973597

3598+
var useSmallTextForLegend = false;
35983599
function drawImageParametersOnContext(context2d) {
35993600
let imaginaryCoordinates = false;
36003601
if ("usesImaginaryCoordinates" in plotsByName[historyParams.plot].privContext) {
36013602
imaginaryCoordinates = plotsByName[historyParams.plot].privContext.usesImaginaryCoordinates;
36023603
}
36033604
const ctx = context2d;
36043605
const canvas = ctx.canvas;
3605-
const lineValLengthLimit = 26;
3606-
const noticeHeight = Math.max(16, canvas.height * 0.01);
3606+
const lineValLengthLimit = useSmallTextForLegend ? 42 : 26;
3607+
const noticeHeight = useSmallTextForLegend ? Math.max(14, canvas.height * 0.0085) : Math.max(16, canvas.height * 0.01);
36073608
const textHeight = Math.round(noticeHeight * 0.6);
36083609
const noticeWidth = Math.max(200, textHeight * lineValLengthLimit * 0.9);
36093610
const lines = [];

0 commit comments

Comments
 (0)