|
@@ -573,13 +573,14 @@
|
|
|
that.canvasImgScale = 680/image.width;
|
|
|
that.ctx.drawImage(image, 0, 0, that.srcImgWidth, that.srcImgHeight, 0, 0, that.srcImgWidth*that.canvasImgScale, that
|
|
|
.srcImgHeight*that.canvasImgScale)
|
|
|
- console.log(objective_result,111111)
|
|
|
objective_result.forEach(item=>{
|
|
|
item.forEach(iitem=>{
|
|
|
that.drawRect(iitem.absX*that.canvasImgScale,iitem.absY*that.canvasImgScale,iitem.w*that.canvasImgScale,iitem.h*that.canvasImgScale);
|
|
|
that.ctx.font = '12px Arial';
|
|
|
that.ctx.fillStyle = 'red';
|
|
|
- that.ctx.fillText(iitem.ans, iitem.absX*that.canvasImgScale,iitem.absY*that.canvasImgScale);
|
|
|
+ if(iitem.ans){
|
|
|
+ that.ctx.fillText(iitem.ans, iitem.absX*that.canvasImgScale,iitem.absY*that.canvasImgScale);
|
|
|
+ }
|
|
|
})
|
|
|
})
|
|
|
|