Make placement guide the correct size
This commit is contained in:
parent
391a319f6d
commit
8e2c42171b
@ -186,6 +186,8 @@ function enableGuideBox(image, scalecorrectionfactor) {
|
|||||||
var imageHeight = (image.height / (96 * scalecorrectionfactor)) * canvasCurrentDPI;
|
var imageHeight = (image.height / (96 * scalecorrectionfactor)) * canvasCurrentDPI;
|
||||||
|
|
||||||
var canvas = $("#placementguidebox")[0];
|
var canvas = $("#placementguidebox")[0];
|
||||||
|
canvas.width = imageWidth;
|
||||||
|
canvas.height = imageHeight;
|
||||||
var ctx = canvas.getContext("2d");
|
var ctx = canvas.getContext("2d");
|
||||||
ctx.drawImage(image, 0, 0, imageWidth, imageHeight);
|
ctx.drawImage(image, 0, 0, imageWidth, imageHeight);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user