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:
Gina Häußge 2015-01-19 16:26:52 +01:00
parent 4bf3d698e3
commit a91a354fa9

View file

@ -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;