From 022825195a2b90aa4ec662d2bf1e1fc9285c1845 Mon Sep 17 00:00:00 2001 From: Anders Gustafsson Date: Thu, 20 Sep 2018 10:09:39 +0200 Subject: [PATCH] P5-3034 Image editor frame size wrong when on inches --- dist/image-editor.js | 4 +--- examples/canvas/index.html | 20 +++++++++++++++++++- src/FrameHandler.js | 4 +--- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/dist/image-editor.js b/dist/image-editor.js index eecd485..b24c833 100644 --- a/dist/image-editor.js +++ b/dist/image-editor.js @@ -1043,9 +1043,7 @@ function FrameHandler(viewport) { var vpData = viewport.getData(); var realFrameSize = 29; // Actual real life frame size width in mm. - if (vpData.dim.units === 'inch') { - realFrameSize /= 2.54; - } + _frameSize = vpData.ppmm * realFrameSize * viewport.canvas.getImage().scaleX; diff --git a/examples/canvas/index.html b/examples/canvas/index.html index e07511c..e79eb97 100644 --- a/examples/canvas/index.html +++ b/examples/canvas/index.html @@ -17,6 +17,11 @@ + + @@ -25,6 +30,7 @@