Skip to content

Commit

Permalink
Fix canvas not going to the border of window
Browse files Browse the repository at this point in the history
  • Loading branch information
qu1ck committed Aug 5, 2018
1 parent 2629dc2 commit 1555744
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions InteractiveHtmlBom/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ function prepareLayer(canvasdict) {

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

0 comments on commit 1555744

Please sign in to comment.