Fixed a bug causing the GCODE viewer to be zoomed in outside of the print bed due to missing initial move
Possible fix for #719
This commit is contained in:
parent
4bf3d698e3
commit
a91a354fa9
1 changed files with 1 additions and 0 deletions
|
|
@ -513,6 +513,7 @@ GCODE.renderer = (function(){
|
|||
bedWidth = bedHeight = renderOptions["bed"]["r"] * 2;
|
||||
}
|
||||
zoomFactor = Math.min((canvas.width - 10) / bedWidth, (canvas.height - 10) / bedHeight);
|
||||
ctx.translate((canvas.width - bedWidth * zoomFactor) / 2, (canvas.height + bedHeight * zoomFactor) / 2);
|
||||
|
||||
offsetModelX = 0;
|
||||
offsetModelY = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue