Browse Source

Merge pull request 'fix-437 fix-416' (#440) from fix-437 into V20210927

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/440
pull/443/head
A00老虎 3 years ago
parent
commit
be5d116809
1 changed files with 13 additions and 3 deletions
  1. +13
    -3
      public/self/js/Director/detection.js

+ 13
- 3
public/self/js/Director/detection.js View File

@@ -712,7 +712,17 @@ function loadimg(){
reset_var();
var picturePath = labeltastresult[fileindex].pic_image_field;
img.src = ip + "/getgiteaimage?filename=" + picturePath;
var html = picturePath.substring(picturePath.lastIndexOf("/") + 1) + "  "+ "(" + (tablePageData.current * pageSize + fileindex + 1) + "/" + tablePageData.total + ")"
var picIndex = picturePath.indexOf("/",70);
if(picIndex != -1){
float_text_name = picturePath.substring(picIndex + 1);
float_text_name = float_text_name.substring(float_text_name.indexOf('/')+1);
}else{
float_text_name = picturePath.substring(picturePath.lastIndexOf("/") + 1)
}
var html = float_text_name + "    "+ "(" + (tablePageData.current * pageSize + fileindex + 1) + "/" + tablePageData.total + ")"
document.getElementById("float_text").innerHTML = html;
}
function save(){
@@ -2843,8 +2853,8 @@ function isJSON(str) {
img.onload = function(){
loadFinished = false;
// 初始设置画布大小,最大值宽和高
canvas.width = maxWidth;//document.getElementById("tool0").offsetWidth;
canvas.height = maxHeight;//document.getElementById("tool0").offsetWidth/1280*720;
canvas.width = img.width;// maxWidth document.getElementById("tool0").offsetWidth;
canvas.height =img.height;//maxHeight document.getElementById("tool0").offsetWidth/1280*720;
//调整画布大小
if ((img.width/img.height)<(canvas.width/canvas.height)){
canvas.width=canvas.height * img.width / img.height;


Loading…
Cancel
Save