From 2fde36b52d0c4b23e372769f0f253bd76457cb0c Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Thu, 23 Sep 2021 17:50:27 +0800 Subject: [PATCH] fix the image size over the canvas --- public/self/js/Director/detection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/self/js/Director/detection.js b/public/self/js/Director/detection.js index 361c9b60a..a853cd076 100644 --- a/public/self/js/Director/detection.js +++ b/public/self/js/Director/detection.js @@ -2676,7 +2676,7 @@ function setPage(pageData,pageSize){ canvas = document.getElementById("myCanvas"); context = canvas.getContext("2d"); - maxWidth = document.getElementById("showPic").offsetWidth; + maxWidth = document.getElementById("showPic").offsetWidth-56; maxHeight = document.getElementById("showPic").offsetHeight-100; canvas.width = maxWidth; canvas.height = maxHeight;