Skip to content

Commit a3cc842

Browse files
committed
Fix exports
1 parent 423e070 commit a3cc842

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

packages/scan/src/new-outlines/canvas.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
import type { ActiveOutline, OutlineData } from './types';
22

33
export const OUTLINE_ARRAY_SIZE = 7;
4-
export const MONO_FONT =
4+
const MONO_FONT =
55
'Menlo,Consolas,Monaco,Liberation Mono,Lucida Console,monospace';
66

7-
export const INTERPOLATION_SPEED = 0.1;
8-
export const lerp = (start: number, end: number) => {
7+
const INTERPOLATION_SPEED = 0.1;
8+
const lerp = (start: number, end: number) => {
99
return Math.floor(start + (end - start) * INTERPOLATION_SPEED);
1010
};
1111

12-
export const MAX_PARTS_LENGTH = 4;
13-
export const MAX_LABEL_LENGTH = 40;
14-
export const TOTAL_FRAMES = 45;
12+
const MAX_PARTS_LENGTH = 4;
13+
const MAX_LABEL_LENGTH = 40;
14+
const TOTAL_FRAMES = 45;
1515

16-
export const primaryColor = '115,97,230';
17-
export const secondaryColor = '128,128,128';
16+
const PRIMARY_COLOR = '115,97,230';
17+
// const SECONDARY_COLOR = '128,128,128';
1818

1919
function getLabelTextPart(
2020
partsEntries: [number, string[]][],
@@ -209,13 +209,13 @@ export const drawCanvas = (
209209
}
210210

211211
for (const { x, y, width, height, alpha } of rectMap.values()) {
212-
ctx.strokeStyle = `rgba(${primaryColor},${alpha})`;
212+
ctx.strokeStyle = `rgba(${PRIMARY_COLOR},${alpha})`;
213213
ctx.lineWidth = 1;
214214

215215
ctx.beginPath();
216216
ctx.rect(x, y, width, height);
217217
ctx.stroke();
218-
ctx.fillStyle = `rgba(${primaryColor},${alpha * 0.1})`;
218+
ctx.fillStyle = `rgba(${PRIMARY_COLOR},${alpha * 0.1})`;
219219
ctx.fill();
220220
}
221221

@@ -304,13 +304,13 @@ export const drawCanvas = (
304304
for (const label of labelMap.values()) {
305305
const { x, y, alpha, width, height, text } = label;
306306

307-
let labelY: number = y - height - 4;
307+
let labelY = y - height - 4;
308308

309309
if (labelY < 0) {
310310
labelY = 0;
311311
}
312312

313-
ctx.fillStyle = `rgba(${primaryColor},${alpha})`;
313+
ctx.fillStyle = `rgba(${PRIMARY_COLOR},${alpha})`;
314314
ctx.fillRect(x, labelY, width + 4, height + 4);
315315

316316
ctx.fillStyle = `rgba(255,255,255,${alpha})`;

0 commit comments

Comments
 (0)