|
|
@@ -123,13 +123,13 @@ function loadimg(uuid,filename){ |
|
|
|
function loadimg(){ |
|
|
|
var length = labeltastresult[fileindex].pic_image_field.length; |
|
|
|
|
|
|
|
if(labeltastresult[fileindex].pic_image_field.substring(length - 5) == ".json" |
|
|
|
|| labeltastresult[fileindex].pic_image_field.substring(length - 4) == ".xml" |
|
|
|
|| labeltastresult[fileindex].pic_image_field.substring(length - 4) == ".txt" |
|
|
|
|| labeltastresult[fileindex].pic_image_field.substring(length - 4) == ".csv" |
|
|
|
|| labeltastresult[fileindex].pic_image_field.substring(length - 3) == ".md" |
|
|
|
|| labeltastresult[fileindex].pic_image_field.substring(length - 3) == ".py" |
|
|
|
|| labeltastresult[fileindex].pic_image_field.substring(length - 3) == ".sh"){ |
|
|
|
if(labeltastresult[fileindex].pic_image_field.substring(length - 5).toLowerCase() == ".json" |
|
|
|
|| labeltastresult[fileindex].pic_image_field.substring(length - 4).toLowerCase() == ".xml" |
|
|
|
|| labeltastresult[fileindex].pic_image_field.substring(length - 4).toLowerCase() == ".txt" |
|
|
|
|| labeltastresult[fileindex].pic_image_field.substring(length - 4).toLowerCase() == ".csv" |
|
|
|
|| labeltastresult[fileindex].pic_image_field.substring(length - 3).toLowerCase() == ".md" |
|
|
|
|| labeltastresult[fileindex].pic_image_field.substring(length - 3).toLowerCase() == ".py" |
|
|
|
|| labeltastresult[fileindex].pic_image_field.substring(length - 3).toLowerCase() == ".sh"){ |
|
|
|
|
|
|
|
//文本 |
|
|
|
canvas.style.display="none"; |
|
|
@@ -138,11 +138,11 @@ function loadimg(){ |
|
|
|
$('#textcontent').height(canvas.height-40) |
|
|
|
$("#textcontent").text(textContent); |
|
|
|
}else{ |
|
|
|
if(labeltastresult[fileindex].pic_image_field.substring(length - 5) == ".jpeg" |
|
|
|
|| labeltastresult[fileindex].pic_image_field.substring(length - 4) == ".jpg" |
|
|
|
|| labeltastresult[fileindex].pic_image_field.substring(length - 4) == ".bmp" |
|
|
|
|| labeltastresult[fileindex].pic_image_field.substring(length - 4) == ".gif" |
|
|
|
|| labeltastresult[fileindex].pic_image_field.substring(length - 4) == ".png"){ |
|
|
|
if(labeltastresult[fileindex].pic_image_field.substring(length - 5).toLowerCase() == ".jpeg" |
|
|
|
|| labeltastresult[fileindex].pic_image_field.substring(length - 4).toLowerCase() == ".jpg" |
|
|
|
|| labeltastresult[fileindex].pic_image_field.substring(length - 4).toLowerCase() == ".bmp" |
|
|
|
|| labeltastresult[fileindex].pic_image_field.substring(length - 4).toLowerCase() == ".gif" |
|
|
|
|| labeltastresult[fileindex].pic_image_field.substring(length - 4).toLowerCase() == ".png"){ |
|
|
|
canvas.style.display="block"; |
|
|
|
document.getElementById("textcontent").style.display="none"; |
|
|
|
img.src = ip + "/getgiteaimage?uuid=" + dataset_id + "&filename=" + labeltastresult[fileindex].pic_image_field; |
|
|
|