Skip to content

Commit 1555744

Browse files
committed
Fix canvas not going to the border of window
1 parent 2629dc2 commit 1555744

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

InteractiveHtmlBom/render.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,8 @@ function prepareLayer(canvasdict) {
284284

285285
function recalcLayerScale(canvasdict) {
286286
canvasdivid = { "F": "frontcanvas", "B": "backcanvas"}[canvasdict.layer];
287-
var width = document.getElementById(canvasdivid).clientWidth * 2 - 10;
288-
var height = document.getElementById(canvasdivid).clientHeight * 2 - 10;
287+
var width = document.getElementById(canvasdivid).clientWidth * 2;
288+
var height = document.getElementById(canvasdivid).clientHeight * 2;
289289
var [minx, maxx, miny, maxy] = getEdgesBoundaries(pcbdata.edges);
290290
var scalefactor = Math.min(
291291
width * 0.98 / (maxx - minx),

0 commit comments

Comments
 (0)