@@ 132,7 132,7 @@ function renderPoint(renderOpts, point) {
ctx.fill();
}
-function renderLine(renderOpts, color, arrow, from, to, curCtx = ctx, transform = transformPoint) {
+function renderLine(renderOpts, color, arrow, from, to, curCtx = ctx, transform = transformPoint, scaleFactor = 1) {
const fromT = pointToCanvasCoords(renderOpts, transform(from));
const toT = pointToCanvasCoords(renderOpts, transform(to));
@@ 140,7 140,7 @@ function renderLine(renderOpts, color, arrow, from, to, curCtx = ctx, transform
curCtx.fillStyle = color;
// line
- const lineWidth = LINE_WIDTH * state.scale;
+ const lineWidth = LINE_WIDTH * scaleFactor * state.scale;
curCtx.beginPath();
curCtx.moveTo(fromT[0], fromT[1]);
curCtx.lineTo(toT[0], toT[1]);
@@ 192,7 192,7 @@ function renderGrid(renderOpts, curCtx, transform = transformPoint) {
renderOpts, themeColor("gridMinor"), false,
[i + 0.5, -screenBottom],
[i + 0.5, screenBottom],
- curCtx, transform
+ curCtx, transform, 0.5
);
}
if (i !== 0) {
@@ 208,7 208,7 @@ function renderGrid(renderOpts, curCtx, transform = transformPoint) {
renderOpts, themeColor("gridMinor"), false,
[-i - 0.5, -screenBottom],
[-i - 0.5, screenBottom],
- curCtx, transform
+ curCtx, transform, 0.5
);
}
}
@@ 225,7 225,7 @@ function renderGrid(renderOpts, curCtx, transform = transformPoint) {
renderOpts, themeColor("gridMinor"), false,
[-screenRight, i + 0.5],
[screenRight, i + 0.5],
- curCtx, transform
+ curCtx, transform, 0.5
);
}
if (i !== 0) {
@@ 241,7 241,7 @@ function renderGrid(renderOpts, curCtx, transform = transformPoint) {
renderOpts, themeColor("gridMinor"), false,
[-screenRight, -i - 0.5],
[screenRight, -i - 0.5],
- curCtx, transform
+ curCtx, transform, 0.5
);
}
}