Commit 4a5fbb1e authored by limingzhe's avatar limingzhe

fix: debug

parent 94323bf8
...@@ -843,8 +843,8 @@ cc.Class({ ...@@ -843,8 +843,8 @@ cc.Class({
spr.node.y = animNode.y; spr.node.y = animNode.y;
spr.node.scale = animNode.scale; spr.node.scale = animNode.scale;
console.log(' spr.node.width: ', spr.node.width) // console.log(' spr.node.width: ', spr.node.width)
console.log(' spr.node.height: ', spr.node.height) // console.log(' spr.node.height: ', spr.node.height)
}) })
} }
}, },
...@@ -1984,27 +1984,27 @@ cc.Class({ ...@@ -1984,27 +1984,27 @@ cc.Class({
// if (this.debugLayer.parent && this.debugLayer.active) { if (this.debugLayer.parent && this.debugLayer.active) {
// if (this.isCanDraw) { if (this.isCanDraw) {
// return; return;
// } }
// this.isCanDraw = true; this.isCanDraw = true;
// delayCall(0.1, () => { delayCall(0.1, () => {
// this.isCanDraw = false; this.isCanDraw = false;
// }) })
// } }
// this.pushNodePoolArr(); this.pushNodePoolArr();
// if (!this.canTouch && isPool == false) { if (!this.canTouch && isPool == false) {
// this.dataPool.push(data); this.dataPool.push(data);
// console.log('! cantouch') console.log('! cantouch')
// return; return;
// } }
// this.changeBboxPos(data); // this.changeBboxPos(data);
...@@ -2453,7 +2453,7 @@ cc.Class({ ...@@ -2453,7 +2453,7 @@ cc.Class({
} }
console.log('answerData: ', answerData); // console.log('answerData: ', answerData);
// console.log('this.picNodeArr: ', this.picNodeArr); // console.log('this.picNodeArr: ', this.picNodeArr);
if (Object.keys(answerData).length == 0) { if (Object.keys(answerData).length == 0) {
...@@ -2482,8 +2482,8 @@ cc.Class({ ...@@ -2482,8 +2482,8 @@ cc.Class({
const bigNodeArr = this.writeNodeArr1; const bigNodeArr = this.writeNodeArr1;
const smallNodeArr = this.writeNodeArr2; const smallNodeArr = this.writeNodeArr2;
console.log('bigNodeArr: ', bigNodeArr); // console.log('bigNodeArr: ', bigNodeArr);
console.log('smallNodeArr: ', smallNodeArr); // console.log('smallNodeArr: ', smallNodeArr);
for (let i = 0; i < 7; i++) { for (let i = 0; i < 7; i++) {
const keyB = i + '_' + 'b'; const keyB = i + '_' + 'b';
...@@ -2659,7 +2659,7 @@ cc.Class({ ...@@ -2659,7 +2659,7 @@ cc.Class({
// label.color = cc.Color.RED; // label.color = cc.Color.RED;
const l = label.getComponent(cc.Label); const l = label.getComponent(cc.Label);
label.anchorX = 0; label.anchorX = 0;
console.log(' sentence~: ', sentence); // console.log(' sentence~: ', sentence);
} }
...@@ -2676,13 +2676,13 @@ cc.Class({ ...@@ -2676,13 +2676,13 @@ cc.Class({
}, },
checkIsInsert(textArr, sentence) { checkIsInsert(textArr, sentence) {
console.log('textArr: ', textArr); // console.log('textArr: ', textArr);
console.log('sentence: ', sentence); // console.log('sentence: ', sentence);
let index = -1; let index = -1;
for (let i = 0; i < textArr.length; i++) { for (let i = 0; i < textArr.length; i++) {
index = sentence.indexOf(textArr[i], index); index = sentence.indexOf(textArr[i], index);
console.log('index: ', index); // console.log('index: ', index);
if (index == -1) { if (index == -1) {
return false; return false;
} }
...@@ -3149,7 +3149,7 @@ cc.Class({ ...@@ -3149,7 +3149,7 @@ cc.Class({
return false; return false;
} }
console.log(' in getAnswerData: ', text); // console.log(' in getAnswerData: ', text);
const benchmark1LabelData = this.benchmark1LabelData; const benchmark1LabelData = this.benchmark1LabelData;
let benchmark2LabelData ; let benchmark2LabelData ;
...@@ -3223,7 +3223,7 @@ cc.Class({ ...@@ -3223,7 +3223,7 @@ cc.Class({
// console.log(' unitW ~~~ ', unitW); // console.log(' unitW ~~~ ', unitW);
// console.log(' unitH ~~~ ', unitH); // console.log(' unitH ~~~ ', unitH);
console.log("centerItemArr: ", centerItemArr); // console.log("centerItemArr: ", centerItemArr);
const dotArr = []; const dotArr = [];
for (let i=0; i<this.centerItemArr.length; i++) { for (let i=0; i<this.centerItemArr.length; i++) {
...@@ -3310,10 +3310,10 @@ cc.Class({ ...@@ -3310,10 +3310,10 @@ cc.Class({
console.log('colorRect: ', colorRect); // console.log('colorRect: ', colorRect);
console.log('dotArr: ', dotArr); // console.log('dotArr: ', dotArr);
console.log('answerData: ', answerData.toString()); // console.log('answerData: ', answerData.toString());
console.log('wordDataArr[i]: ', wordDataArr[i].toString()); // console.log('wordDataArr[i]: ', wordDataArr[i].toString());
this.setOneAnswerData(colorRect, dotArr, answerData, wordDataArr[i]); this.setOneAnswerData(colorRect, dotArr, answerData, wordDataArr[i]);
...@@ -3351,8 +3351,8 @@ cc.Class({ ...@@ -3351,8 +3351,8 @@ cc.Class({
const {left, right, top, bottom} = curTextArr[i]; const {left, right, top, bottom} = curTextArr[i];
const text = curTextArr[i].content; const text = curTextArr[i].content;
console.log('text..', JSON.stringify( curTextArr[i] )); // console.log('text..', JSON.stringify( curTextArr[i] ));
console.log('text..', text); // console.log('text..', text);
const disW = (right - left) / text.length; const disW = (right - left) / text.length;
const disH = (bottom - top); const disH = (bottom - top);
for (let j=0; j<text.length; j++) { for (let j=0; j<text.length; j++) {
...@@ -3453,7 +3453,7 @@ cc.Class({ ...@@ -3453,7 +3453,7 @@ cc.Class({
const unitH = -topLabelData.top + bottomLabelData.bottom; const unitH = -topLabelData.top + bottomLabelData.bottom;
const rate = 0.26; const rate = 0.26;
console.log('unitH: ', unitH); // console.log('unitH: ', unitH);
let rectH; let rectH;
...@@ -3464,7 +3464,7 @@ cc.Class({ ...@@ -3464,7 +3464,7 @@ cc.Class({
if (-topLeftPosY > -topLabelData.top - totalH / 3) { if (-topLeftPosY > -topLabelData.top - totalH / 3) {
unit = topLeftLetter.bottom - topLabelData.bottom; unit = topLeftLetter.bottom - topLabelData.bottom;
console.log('unit: ', unit); // console.log('unit: ', unit);
// 50 // 50
...@@ -3481,7 +3481,7 @@ cc.Class({ ...@@ -3481,7 +3481,7 @@ cc.Class({
rectW = 0.54 *rate * unitH; //27; rectW = 0.54 *rate * unitH; //27;
disW = 0.6 *rate * unitH; //46; disW = 0.6 *rate * unitH; //46;
console.log('unit: ', unit); // console.log('unit: ', unit);
} }
...@@ -3627,7 +3627,7 @@ cc.Class({ ...@@ -3627,7 +3627,7 @@ cc.Class({
// if (labelText.toLowerCase().indexOf(targetLabelText.toLowerCase()) != -1 && rect.intersects(dotRect)) { // if (labelText.toLowerCase().indexOf(targetLabelText.toLowerCase()) != -1 && rect.intersects(dotRect)) {
const len = targetLabelText.trim().length; const len = targetLabelText.trim().length;
console.log('len: ', len); // console.log('len: ', len);
if (!answerData[key]) { if (!answerData[key]) {
answerData[key] = {colorRect, count: len}; answerData[key] = {colorRect, count: len};
......
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