Commit accdb0c9 authored by limingzhe's avatar limingzhe

fix: debug

parent 092546fc
......@@ -511,10 +511,10 @@ cc.Class({
//调起检测
startTesting() {
// this.getPhotoData((data) => {
// this.photoEnd(data);
// });
// return;
this.getPhotoData((data) => {
this.photoEnd(data);
});
return;
const cw = window.courseware;
......@@ -598,6 +598,9 @@ cc.Class({
this.debugDrawLayer.removeAllChildren();
this.checkIsRightArea(data);
const answerData = this.getAnswerData(data);
this.showUserRight(answerData, data);
......@@ -1060,6 +1063,21 @@ cc.Class({
}
const sentence = line.content;
const label = this.getLabel(sentence, 150);
label.x = line.left * this.debugBgImg.width;
label.y = -(line.top + (line.bottom - line.top) / 2) * this.debugBgImg.height;
label.parent = this.debugDrawLayer;
label.zIndex = 200;
// label.color = cc.Color.RED;
const l = label.getComponent(cc.Label);
label.anchorX = 0;
console.log(' sentence~: ', sentence);
if (this.checkIsInsert(textArr, sentence)) {
return line;
}
......@@ -1221,7 +1239,7 @@ cc.Class({
picNode.hitCount++;
if (picNode.hitCount < 2) {
if (picNode.hitCount < 1) {
return;
}
......@@ -1997,12 +2015,13 @@ cc.Class({
this.debugLayer.addChild(label);
},
getLabel(text) {
getLabel(text, fontSize = 20) {
const labelNode = new cc.Node();
const label = labelNode.addComponent(cc.Label);
label.string = text;
labelNode.color = cc.Color.BLACK;
label.fontSize = 20;
label.fontSize = fontSize;
label.lineHeight = fontSize;
return labelNode;
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment